Merge tag 'iomap-6.4-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 29 Apr 2023 17:35:48 +0000 (10:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 29 Apr 2023 17:35:48 +0000 (10:35 -0700)
Pull iomap updates from Darrick Wong:
 "The only changes for this cycle are the addition of tracepoints to the
  iomap directio code so that Ritesh (who is working on porting ext2 to
  iomap) can observe the io flows more easily.

  Summary:

   - Remove an unused symbol

   - Add tracepoints for the directio code"

* tag 'iomap-6.4-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  iomap: Add DIO tracepoints
  iomap: Remove IOMAP_DIO_NOSYNC unused dio flag
  fs.h: Add TRACE_IOCB_STRINGS for use in trace points

1  2 
include/linux/fs.h

diff --combined include/linux/fs.h
@@@ -168,9 -168,6 +168,9 @@@ typedef int (dio_iodone_t)(struct kioc
  
  #define       FMODE_NOREUSE           ((__force fmode_t)0x800000)
  
 +/* File supports non-exclusive O_DIRECT writes from multiple threads */
 +#define FMODE_DIO_PARALLEL_WRITE      ((__force fmode_t)0x1000000)
 +
  /* File was opened by fanotify and shouldn't generate fanotify events */
  #define FMODE_NONOTIFY                ((__force fmode_t)0x4000000)
  
@@@ -343,6 -340,20 +343,20 @@@ enum rw_hint 
  /* can use bio alloc cache */
  #define IOCB_ALLOC_CACHE      (1 << 21)
  
+ /* for use in trace events */
+ #define TRACE_IOCB_STRINGS \
+       { IOCB_HIPRI,           "HIPRI" }, \
+       { IOCB_DSYNC,           "DSYNC" }, \
+       { IOCB_SYNC,            "SYNC" }, \
+       { IOCB_NOWAIT,          "NOWAIT" }, \
+       { IOCB_APPEND,          "APPEND" }, \
+       { IOCB_EVENTFD,         "EVENTFD"}, \
+       { IOCB_DIRECT,          "DIRECT" }, \
+       { IOCB_WRITE,           "WRITE" }, \
+       { IOCB_WAITQ,           "WAITQ" }, \
+       { IOCB_NOIO,            "NOIO" }, \
+       { IOCB_ALLOC_CACHE,     "ALLOC_CACHE" }
  struct kiocb {
        struct file             *ki_filp;
        loff_t                  ki_pos;
@@@ -2678,8 -2689,6 +2692,8 @@@ extern struct inode *new_inode(struct s
  extern void free_inode_nonrcu(struct inode *inode);
  extern int setattr_should_drop_suidgid(struct mnt_idmap *, struct inode *);
  extern int file_remove_privs(struct file *);
 +int setattr_should_drop_sgid(struct mnt_idmap *idmap,
 +                           const struct inode *inode);
  
  /*
   * This must be used for allocating filesystems specific inodes to set
@@@ -2783,7 -2792,7 +2797,7 @@@ enum 
  ssize_t __blockdev_direct_IO(struct kiocb *iocb, struct inode *inode,
                             struct block_device *bdev, struct iov_iter *iter,
                             get_block_t get_block,
 -                           dio_iodone_t end_io, dio_submit_t submit_io,
 +                           dio_iodone_t end_io,
                             int flags);
  
  static inline ssize_t blockdev_direct_IO(struct kiocb *iocb,
                                         get_block_t get_block)
  {
        return __blockdev_direct_IO(iocb, inode, inode->i_sb->s_bdev, iter,
 -                      get_block, NULL, NULL, DIO_LOCKING | DIO_SKIP_HOLES);
 +                      get_block, NULL, DIO_LOCKING | DIO_SKIP_HOLES);
  }
  #endif