2 * (C) 2001 Clemson University and The University of Chicago
4 * See COPYING in top-level directory.
8 * Linux VFS file operations.
12 #include "pvfs2-kernel.h"
13 #include "pvfs2-bufmap.h"
15 #include <linux/pagemap.h>
17 #define wake_up_daemon_for_return(op) \
19 spin_lock(&op->lock); \
20 op->io_completed = 1; \
21 spin_unlock(&op->lock); \
22 wake_up_interruptible(&op->io_completion_waitq);\
26 * Copy to client-core's address space from the buffers specified
27 * by the iovec upto total_size bytes.
28 * NOTE: the iovector can either contain addresses which
29 * can futher be kernel-space or user-space addresses.
30 * or it can pointers to struct page's
32 static int precopy_buffers(struct pvfs2_bufmap *bufmap,
34 const struct iovec *vec,
35 unsigned long nr_segs,
42 * copy data from application/kernel by pulling it out
48 iov_iter_init(&iter, WRITE, vec, nr_segs, total_size);
49 ret = pvfs_bufmap_copy_from_iovec(bufmap,
54 gossip_err("%s: Failed to copy-in buffers. Please make sure that the pvfs2-client is running. %ld\n",
60 gossip_err("%s: Failed to copy-in buffers. Please make sure that the pvfs2-client is running. %ld\n",
67 * Copy from client-core's address space to the buffers specified
68 * by the iovec upto total_size bytes.
69 * NOTE: the iovector can either contain addresses which
70 * can futher be kernel-space or user-space addresses.
71 * or it can pointers to struct page's
73 static int postcopy_buffers(struct pvfs2_bufmap *bufmap,
75 const struct iovec *vec,
84 * copy data to application/kernel by pushing it out to
85 * the iovec. NOTE; target buffers can be addresses or
86 * struct page pointers.
89 iov_iter_init(&iter, READ, vec, nr_segs, total_size);
90 ret = pvfs_bufmap_copy_to_iovec(bufmap,
94 gossip_err("%s: Failed to copy-out buffers. Please make sure that the pvfs2-client is running (%ld)\n",
102 * Post and wait for the I/O upcall to finish
104 static ssize_t wait_for_direct_io(enum PVFS_io_type type, struct inode *inode,
105 loff_t *offset, struct iovec *vec, unsigned long nr_segs,
106 size_t total_size, loff_t readahead_size)
108 struct pvfs2_inode_s *pvfs2_inode = PVFS2_I(inode);
109 struct pvfs2_khandle *handle = &pvfs2_inode->refn.khandle;
110 struct pvfs2_bufmap *bufmap = NULL;
111 struct pvfs2_kernel_op_s *new_op = NULL;
112 int buffer_index = -1;
115 new_op = op_alloc(PVFS2_VFS_OP_FILE_IO);
120 /* synchronous I/O */
121 new_op->upcall.req.io.async_vfs_io = PVFS_VFS_SYNC_IO;
122 new_op->upcall.req.io.readahead_size = readahead_size;
123 new_op->upcall.req.io.io_type = type;
124 new_op->upcall.req.io.refn = pvfs2_inode->refn;
126 populate_shared_memory:
127 /* get a shared buffer index */
128 ret = pvfs_bufmap_get(&bufmap, &buffer_index);
130 gossip_debug(GOSSIP_FILE_DEBUG,
131 "%s: pvfs_bufmap_get failure (%ld)\n",
132 __func__, (long)ret);
135 gossip_debug(GOSSIP_FILE_DEBUG,
136 "%s(%pU): GET op %p -> buffer_index %d\n",
142 new_op->uses_shared_memory = 1;
143 new_op->upcall.req.io.buf_index = buffer_index;
144 new_op->upcall.req.io.count = total_size;
145 new_op->upcall.req.io.offset = *offset;
147 gossip_debug(GOSSIP_FILE_DEBUG,
148 "%s(%pU): nr_segs %lu, offset: %llu total_size: %zd\n",
155 * Stage 1: copy the buffers into client-core's address space
156 * precopy_buffers only pertains to writes.
158 if (type == PVFS_IO_WRITE) {
159 ret = precopy_buffers(bufmap,
168 gossip_debug(GOSSIP_FILE_DEBUG,
169 "%s(%pU): Calling post_io_request with tag (%llu)\n",
174 /* Stage 2: Service the I/O operation */
175 ret = service_operation(new_op,
176 type == PVFS_IO_WRITE ?
179 get_interruptible_flag(inode));
182 * If service_operation() returns -EAGAIN #and# the operation was
183 * purged from pvfs2_request_list or htable_ops_in_progress, then
184 * we know that the client was restarted, causing the shared memory
185 * area to be wiped clean. To restart a write operation in this
186 * case, we must re-copy the data from the user's iovec to a NEW
187 * shared memory location. To restart a read operation, we must get
188 * a new shared memory location.
190 if (ret == -EAGAIN && op_state_purged(new_op)) {
191 pvfs_bufmap_put(bufmap, buffer_index);
192 gossip_debug(GOSSIP_FILE_DEBUG,
193 "%s:going to repopulate_shared_memory.\n",
195 goto populate_shared_memory;
199 handle_io_error(); /* defined in pvfs2-kernel.h */
201 * don't write an error to syslog on signaled operation
202 * termination unless we've got debugging turned on, as
203 * this can happen regularly (i.e. ctrl-c)
206 gossip_debug(GOSSIP_FILE_DEBUG,
207 "%s: returning error %ld\n", __func__,
210 gossip_err("%s: error in %s handle %pU, returning %zd\n",
212 type == PVFS_IO_READ ?
213 "read from" : "write to",
219 * Stage 3: Post copy buffers from client-core's address space
220 * postcopy_buffers only pertains to reads.
222 if (type == PVFS_IO_READ) {
223 ret = postcopy_buffers(bufmap,
227 new_op->downcall.resp.io.amt_complete);
230 * put error codes in downcall so that handle_io_error()
231 * preserves it properly
233 new_op->downcall.status = ret;
238 gossip_debug(GOSSIP_FILE_DEBUG,
239 "%s(%pU): Amount written as returned by the sys-io call:%d\n",
242 (int)new_op->downcall.resp.io.amt_complete);
244 ret = new_op->downcall.resp.io.amt_complete;
247 * tell the device file owner waiting on I/O that this read has
248 * completed and it can return now. in this exact case, on
249 * wakeup the daemon will free the op, so we *cannot* touch it
252 wake_up_daemon_for_return(new_op);
256 if (buffer_index >= 0) {
257 pvfs_bufmap_put(bufmap, buffer_index);
258 gossip_debug(GOSSIP_FILE_DEBUG,
259 "%s(%pU): PUT buffer_index %d\n",
260 __func__, handle, buffer_index);
271 * The reason we need to do this is to be able to support readv and writev
272 * that are larger than (pvfs_bufmap_size_query()) Default is
273 * PVFS2_BUFMAP_DEFAULT_DESC_SIZE MB. What that means is that we will
274 * create a new io vec descriptor for those memory addresses that
275 * go beyond the limit. Return value for this routine is negative in case
276 * of errors and 0 in case of success.
278 * Further, the new_nr_segs pointer is updated to hold the new value
279 * of number of iovecs, the new_vec pointer is updated to hold the pointer
280 * to the new split iovec, and the size array is an array of integers holding
281 * the number of iovecs that straddle pvfs_bufmap_size_query().
282 * The max_new_nr_segs value is computed by the caller and returned.
283 * (It will be (count of all iov_len/ block_size) + 1).
285 static int split_iovecs(unsigned long max_new_nr_segs, /* IN */
286 unsigned long nr_segs, /* IN */
287 const struct iovec *original_iovec, /* IN */
288 unsigned long *new_nr_segs, /* OUT */
289 struct iovec **new_vec, /* OUT */
290 unsigned long *seg_count, /* OUT */
291 unsigned long **seg_array) /* OUT */
294 unsigned long count = 0;
295 unsigned long begin_seg;
296 unsigned long tmpnew_nr_segs = 0;
297 struct iovec *new_iovec = NULL;
298 struct iovec *orig_iovec;
299 unsigned long *sizes = NULL;
300 unsigned long sizes_count = 0;
303 original_iovec == NULL ||
304 new_nr_segs == NULL ||
308 max_new_nr_segs <= 0) {
309 gossip_err("Invalid parameters to split_iovecs\n");
316 /* copy the passed in iovec descriptor to a temp structure */
317 orig_iovec = kmalloc_array(nr_segs,
319 PVFS2_BUFMAP_GFP_FLAGS);
320 if (orig_iovec == NULL) {
322 "split_iovecs: Could not allocate memory for %lu bytes!\n",
323 (unsigned long)(nr_segs * sizeof(*orig_iovec)));
326 new_iovec = kcalloc(max_new_nr_segs,
328 PVFS2_BUFMAP_GFP_FLAGS);
329 if (new_iovec == NULL) {
332 "split_iovecs: Could not allocate memory for %lu bytes!\n",
333 (unsigned long)(max_new_nr_segs * sizeof(*new_iovec)));
336 sizes = kcalloc(max_new_nr_segs,
338 PVFS2_BUFMAP_GFP_FLAGS);
343 "split_iovecs: Could not allocate memory for %lu bytes!\n",
344 (unsigned long)(max_new_nr_segs * sizeof(*sizes)));
347 /* copy the passed in iovec to a temp structure */
348 memcpy(orig_iovec, original_iovec, nr_segs * sizeof(*orig_iovec));
351 for (seg = begin_seg; seg < nr_segs; seg++) {
352 if (tmpnew_nr_segs >= max_new_nr_segs ||
353 sizes_count >= max_new_nr_segs) {
358 ("split_iovecs: exceeded the index limit (%lu)\n",
362 if (count + orig_iovec[seg].iov_len <
363 pvfs_bufmap_size_query()) {
364 count += orig_iovec[seg].iov_len;
365 memcpy(&new_iovec[tmpnew_nr_segs],
369 sizes[sizes_count]++;
371 new_iovec[tmpnew_nr_segs].iov_base =
372 orig_iovec[seg].iov_base;
373 new_iovec[tmpnew_nr_segs].iov_len =
374 (pvfs_bufmap_size_query() - count);
376 sizes[sizes_count]++;
379 orig_iovec[seg].iov_base +=
380 (pvfs_bufmap_size_query() - count);
381 orig_iovec[seg].iov_len -=
382 (pvfs_bufmap_size_query() - count);
392 *new_nr_segs = tmpnew_nr_segs;
393 /* new_iovec is freed by the caller */
394 *new_vec = new_iovec;
395 *seg_count = sizes_count;
396 /* seg_array is also freed by the caller */
402 static long bound_max_iovecs(const struct iovec *curr, unsigned long nr_segs,
403 ssize_t *total_count)
413 for (i = 0; i < nr_segs; i++) {
414 const struct iovec *iv = &curr[i];
416 count += iv->iov_len;
417 if (unlikely((ssize_t) (count | iv->iov_len) < 0))
419 if (total + iv->iov_len < pvfs_bufmap_size_query()) {
420 total += iv->iov_len;
424 (total + iv->iov_len - pvfs_bufmap_size_query());
425 max_nr_iovecs += (total / pvfs_bufmap_size_query() + 2);
428 *total_count = count;
429 return max_nr_iovecs;
433 * Common entry point for read/write/readv/writev
434 * This function will dispatch it to either the direct I/O
435 * or buffered I/O path depending on the mount options and/or
436 * augmented/extended metadata attached to the file.
437 * Note: File extended attributes override any mount options.
439 static ssize_t do_readv_writev(enum PVFS_io_type type, struct file *file,
440 loff_t *offset, const struct iovec *iov, unsigned long nr_segs)
442 struct inode *inode = file->f_mapping->host;
443 struct pvfs2_inode_s *pvfs2_inode = PVFS2_I(inode);
444 struct pvfs2_khandle *handle = &pvfs2_inode->refn.khandle;
447 unsigned int to_free;
450 unsigned long new_nr_segs;
451 unsigned long max_new_nr_segs;
452 unsigned long seg_count;
453 unsigned long *seg_array;
454 struct iovec *iovecptr;
462 /* Compute total and max number of segments after split */
463 max_new_nr_segs = bound_max_iovecs(iov, nr_segs, &count);
465 gossip_debug(GOSSIP_FILE_DEBUG,
466 "%s-BEGIN(%pU): count(%d) after estimate_max_iovecs.\n",
471 if (type == PVFS_IO_WRITE) {
472 gossip_debug(GOSSIP_FILE_DEBUG,
473 "%s(%pU): proceeding with offset : %llu, "
487 * if the total size of data transfer requested is greater than
488 * the kernel-set blocksize of PVFS2, then we split the iovecs
489 * such that no iovec description straddles a block size limit
492 gossip_debug(GOSSIP_FILE_DEBUG,
493 "%s: pvfs_bufmap_size:%d\n",
495 pvfs_bufmap_size_query());
497 if (count > pvfs_bufmap_size_query()) {
499 * Split up the given iovec description such that
500 * no iovec descriptor straddles over the block-size limitation.
501 * This makes us our job easier to stage the I/O.
502 * In addition, this function will also compute an array
503 * with seg_count entries that will store the number of
504 * segments that straddle the block-size boundaries.
506 ret = split_iovecs(max_new_nr_segs, /* IN */
509 &new_nr_segs, /* OUT */
511 &seg_count, /* OUT */
512 &seg_array); /* OUT */
514 gossip_err("%s: Failed to split iovecs to satisfy larger than blocksize readv/writev request %zd\n",
519 gossip_debug(GOSSIP_FILE_DEBUG,
520 "%s: Splitting iovecs from %lu to %lu"
526 /* We must free seg_array and iovecptr */
529 new_nr_segs = nr_segs;
530 /* use the given iovec description */
531 iovecptr = (struct iovec *)iov;
532 /* There is only 1 element in the seg_array */
534 /* and its value is the number of segments passed in */
535 seg_array = &nr_segs;
536 /* We dont have to free up anything */
541 gossip_debug(GOSSIP_FILE_DEBUG,
542 "%s(%pU) %zd@%llu\n",
547 gossip_debug(GOSSIP_FILE_DEBUG,
548 "%s(%pU): new_nr_segs: %lu, seg_count: %lu\n",
551 new_nr_segs, seg_count);
553 /* PVFS2_KERNEL_DEBUG is a CFLAGS define. */
554 #ifdef PVFS2_KERNEL_DEBUG
555 for (seg = 0; seg < new_nr_segs; seg++)
556 gossip_debug(GOSSIP_FILE_DEBUG,
557 "%s: %d) %p to %p [%d bytes]\n",
560 iovecptr[seg].iov_base,
561 iovecptr[seg].iov_base + iovecptr[seg].iov_len,
562 (int)iovecptr[seg].iov_len);
563 for (seg = 0; seg < seg_count; seg++)
564 gossip_debug(GOSSIP_FILE_DEBUG,
571 while (total_count < count) {
575 /* how much to transfer in this loop iteration */
577 (((count - total_count) > pvfs_bufmap_size_query()) ?
578 pvfs_bufmap_size_query() :
579 (count - total_count));
581 gossip_debug(GOSSIP_FILE_DEBUG,
582 "%s(%pU): size of each_count(%d)\n",
586 gossip_debug(GOSSIP_FILE_DEBUG,
587 "%s(%pU): BEFORE wait_for_io: offset is %d\n",
592 ret = wait_for_direct_io(type, inode, offset, ptr,
593 seg_array[seg], each_count, 0);
594 gossip_debug(GOSSIP_FILE_DEBUG,
595 "%s(%pU): return from wait_for_io:%d\n",
603 /* advance the iovec pointer */
604 ptr += seg_array[seg];
610 gossip_debug(GOSSIP_FILE_DEBUG,
611 "%s(%pU): AFTER wait_for_io: offset is %d\n",
617 * if we got a short I/O operations,
618 * fall out and return what we got so far
620 if (amt_complete < each_count)
632 if (type == PVFS_IO_READ) {
635 SetMtimeFlag(pvfs2_inode);
636 inode->i_mtime = CURRENT_TIME;
637 mark_inode_dirty_sync(inode);
641 gossip_debug(GOSSIP_FILE_DEBUG,
642 "%s(%pU): Value(%d) returned.\n",
651 * Read data from a specified offset in a file (referenced by inode).
652 * Data may be placed either in a user or kernel buffer.
654 ssize_t pvfs2_inode_read(struct inode *inode,
658 loff_t readahead_size)
660 struct pvfs2_inode_s *pvfs2_inode = PVFS2_I(inode);
663 ssize_t ret = -EINVAL;
665 g_pvfs2_stats.reads++;
670 bufmap_size = pvfs_bufmap_size_query();
671 if (count > bufmap_size) {
672 gossip_debug(GOSSIP_FILE_DEBUG,
673 "%s: count is too large (%zd/%zd)!\n",
674 __func__, count, bufmap_size);
678 gossip_debug(GOSSIP_FILE_DEBUG,
679 "%s(%pU) %zd@%llu\n",
681 &pvfs2_inode->refn.khandle,
685 ret = wait_for_direct_io(PVFS_IO_READ, inode, offset, &vec, 1,
686 count, readahead_size);
690 gossip_debug(GOSSIP_FILE_DEBUG,
691 "%s(%pU): Value(%zd) returned.\n",
693 &pvfs2_inode->refn.khandle,
699 static ssize_t pvfs2_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
701 struct file *file = iocb->ki_filp;
702 loff_t pos = *(&iocb->ki_pos);
704 unsigned long nr_segs = iter->nr_segs;
706 BUG_ON(iocb->private);
708 gossip_debug(GOSSIP_FILE_DEBUG, "pvfs2_file_read_iter\n");
710 g_pvfs2_stats.reads++;
712 rc = do_readv_writev(PVFS_IO_READ,
722 static ssize_t pvfs2_file_write_iter(struct kiocb *iocb, struct iov_iter *iter)
724 struct file *file = iocb->ki_filp;
725 loff_t pos = *(&iocb->ki_pos);
726 unsigned long nr_segs = iter->nr_segs;
729 BUG_ON(iocb->private);
731 gossip_debug(GOSSIP_FILE_DEBUG, "pvfs2_file_write_iter\n");
733 mutex_lock(&file->f_mapping->host->i_mutex);
735 /* Make sure generic_write_checks sees an up to date inode size. */
736 if (file->f_flags & O_APPEND) {
737 rc = pvfs2_inode_getattr(file->f_mapping->host,
740 gossip_err("%s: pvfs2_inode_getattr failed, rc:%zd:.\n",
746 if (file->f_pos > i_size_read(file->f_mapping->host))
747 pvfs2_i_size_write(file->f_mapping->host, file->f_pos);
749 rc = generic_write_checks(iocb, iter);
752 gossip_err("%s: generic_write_checks failed, rc:%zd:.\n",
757 rc = do_readv_writev(PVFS_IO_WRITE,
763 gossip_err("%s: do_readv_writev failed, rc:%zd:.\n",
769 g_pvfs2_stats.writes++;
773 mutex_unlock(&file->f_mapping->host->i_mutex);
778 * Perform a miscellaneous operation on a file.
780 static long pvfs2_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
786 gossip_debug(GOSSIP_FILE_DEBUG,
787 "pvfs2_ioctl: called with cmd %d\n",
791 * we understand some general ioctls on files, such as the immutable
794 if (cmd == FS_IOC_GETFLAGS) {
796 ret = pvfs2_xattr_get_default(file->f_path.dentry,
797 "user.pvfs2.meta_hint",
801 if (ret < 0 && ret != -ENODATA)
803 else if (ret == -ENODATA)
806 gossip_debug(GOSSIP_FILE_DEBUG,
807 "pvfs2_ioctl: FS_IOC_GETFLAGS: %llu\n",
808 (unsigned long long)uval);
809 return put_user(uval, (int __user *)arg);
810 } else if (cmd == FS_IOC_SETFLAGS) {
812 if (get_user(uval, (int __user *)arg))
815 * PVFS_MIRROR_FL is set internally when the mirroring mode
816 * is turned on for a file. The user is not allowed to turn
817 * on this bit, but the bit is present if the user first gets
818 * the flags and then updates the flags with some new
819 * settings. So, we ignore it in the following edit. bligon.
821 if ((uval & ~PVFS_MIRROR_FL) &
822 (~(FS_IMMUTABLE_FL | FS_APPEND_FL | FS_NOATIME_FL))) {
823 gossip_err("pvfs2_ioctl: the FS_IOC_SETFLAGS only supports setting one of FS_IMMUTABLE_FL|FS_APPEND_FL|FS_NOATIME_FL\n");
827 gossip_debug(GOSSIP_FILE_DEBUG,
828 "pvfs2_ioctl: FS_IOC_SETFLAGS: %llu\n",
829 (unsigned long long)val);
830 ret = pvfs2_xattr_set_default(file->f_path.dentry,
831 "user.pvfs2.meta_hint",
842 * Memory map a region of a file.
844 static int pvfs2_file_mmap(struct file *file, struct vm_area_struct *vma)
846 gossip_debug(GOSSIP_FILE_DEBUG,
847 "pvfs2_file_mmap: called on %s\n",
849 (char *)file->f_path.dentry->d_name.name :
852 /* set the sequential readahead hint */
853 vma->vm_flags |= VM_SEQ_READ;
854 vma->vm_flags &= ~VM_RAND_READ;
856 /* Use readonly mmap since we cannot support writable maps. */
857 return generic_file_readonly_mmap(file, vma);
860 #define mapping_nrpages(idata) ((idata)->nrpages)
863 * Called to notify the module that there are no more references to
864 * this file (i.e. no processes have it open).
866 * \note Not called when each file is closed.
868 static int pvfs2_file_release(struct inode *inode, struct file *file)
870 gossip_debug(GOSSIP_FILE_DEBUG,
871 "pvfs2_file_release: called on %s\n",
872 file->f_path.dentry->d_name.name);
874 pvfs2_flush_inode(inode);
877 * remove all associated inode pages from the page cache and mmap
878 * readahead cache (if any); this forces an expensive refresh of
879 * data for the next caller of mmap (or 'get_block' accesses)
881 if (file->f_path.dentry->d_inode &&
882 file->f_path.dentry->d_inode->i_mapping &&
883 mapping_nrpages(&file->f_path.dentry->d_inode->i_data))
884 truncate_inode_pages(file->f_path.dentry->d_inode->i_mapping,
890 * Push all data for a specific file onto permanent storage.
892 static int pvfs2_fsync(struct file *file,
898 struct pvfs2_inode_s *pvfs2_inode =
899 PVFS2_I(file->f_path.dentry->d_inode);
900 struct pvfs2_kernel_op_s *new_op = NULL;
903 filemap_write_and_wait_range(file->f_mapping, start, end);
905 new_op = op_alloc(PVFS2_VFS_OP_FSYNC);
908 new_op->upcall.req.fsync.refn = pvfs2_inode->refn;
910 ret = service_operation(new_op,
912 get_interruptible_flag(file->f_path.dentry->d_inode));
914 gossip_debug(GOSSIP_FILE_DEBUG,
915 "pvfs2_fsync got return value of %d\n",
920 pvfs2_flush_inode(file->f_path.dentry->d_inode);
925 * Change the file pointer position for an instance of an open file.
927 * \note If .llseek is overriden, we must acquire lock as described in
928 * Documentation/filesystems/Locking.
930 * Future upgrade could support SEEK_DATA and SEEK_HOLE but would
931 * require much changes to the FS
933 static loff_t pvfs2_file_llseek(struct file *file, loff_t offset, int origin)
936 struct inode *inode = file->f_path.dentry->d_inode;
939 gossip_err("pvfs2_file_llseek: invalid inode (NULL)\n");
943 if (origin == PVFS2_SEEK_END) {
945 * revalidate the inode's file size.
946 * NOTE: We are only interested in file size here,
947 * so we set mask accordingly.
949 ret = pvfs2_inode_getattr(inode, PVFS_ATTR_SYS_SIZE);
951 gossip_debug(GOSSIP_FILE_DEBUG,
952 "%s:%s:%d calling make bad inode\n",
956 pvfs2_make_bad_inode(inode);
961 gossip_debug(GOSSIP_FILE_DEBUG,
962 "pvfs2_file_llseek: offset is %ld | origin is %d"
963 " | inode size is %lu\n",
966 (unsigned long)file->f_path.dentry->d_inode->i_size);
968 return generic_file_llseek(file, offset, origin);
972 * Support local locks (locks that only this kernel knows about)
973 * if Orangefs was mounted -o local_lock.
975 static int pvfs2_lock(struct file *filp, int cmd, struct file_lock *fl)
979 if (PVFS2_SB(filp->f_inode->i_sb)->flags & PVFS2_OPT_LOCAL_LOCK) {
980 if (cmd == F_GETLK) {
982 posix_test_lock(filp, fl);
984 rc = posix_lock_file(filp, fl, NULL);
991 /** PVFS2 implementation of VFS file operations */
992 const struct file_operations pvfs2_file_operations = {
993 .llseek = pvfs2_file_llseek,
994 .read_iter = pvfs2_file_read_iter,
995 .write_iter = pvfs2_file_write_iter,
997 .unlocked_ioctl = pvfs2_ioctl,
998 .mmap = pvfs2_file_mmap,
999 .open = generic_file_open,
1000 .release = pvfs2_file_release,
1001 .fsync = pvfs2_fsync,