1. 07 Nov, 2023 7 commits
    • Linus Torvalds's avatar
      Merge tag 'vfs-6.7.fsid' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs · 13d88ac5
      Linus Torvalds authored
      Pull vfs fanotify fsid updates from Christian Brauner:
       "This work is part of the plan to enable fanotify to serve as a drop-in
        replacement for inotify. While inotify is availabe on all filesystems,
        fanotify currently isn't.
      
        In order to support fanotify on all filesystems two things are needed:
      
         (1) all filesystems need to support AT_HANDLE_FID
      
         (2) all filesystems need to report a non-zero f_fsid
      
        This contains (1) and allows filesystems to encode non-decodable file
        handlers for fanotify without implementing any exportfs operations by
        encoding a file id of type FILEID_INO64_GEN from i_ino and
        i_generation.
      
        Filesystems that want to opt out of encoding non-decodable file ids
        for fanotify that don't support NFS export can do so by providing an
        empty export_operations struct.
      
        This also partially addresses (2) by generating f_fsid for simple
        filesystems as well as freevxfs. Remaining filesystems will be dealt
        with by separate patches.
      
        Finally, this contains the patch from the current exportfs maintainers
        which moves exportfs under vfs with Chuck, Jeff, and Amir as
        maintainers and vfs.git as tree"
      
      * tag 'vfs-6.7.fsid' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
        MAINTAINERS: create an entry for exportfs
        fs: fix build error with CONFIG_EXPORTFS=m or not defined
        freevxfs: derive f_fsid from bdev->bd_dev
        fs: report f_fsid from s_dev for "simple" filesystems
        exportfs: support encoding non-decodeable file handles by default
        exportfs: define FILEID_INO64_GEN* file handle types
        exportfs: make ->encode_fh() a mandatory method for NFS export
        exportfs: add helpers to check if filesystem can encode/decode file handles
      13d88ac5
    • Linus Torvalds's avatar
      Merge tag 'vfs-6.7.iomap' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs · 062cca89
      Linus Torvalds authored
      Pull iomap maintainership rotation from Christian Brauner:
       "As discussed on list last week this makes fs/iomap part of vfs.git
        with Darrick as main reviewer"
      
      * tag 'vfs-6.7.iomap' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
        iomap: rename iomap entry
        iomap: rotate maintainers
      062cca89
    • Linus Torvalds's avatar
      Merge tag 'gfs2-v6.6-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 1a0507d8
      Linus Torvalds authored
      Pull gfs2 updates from Andreas Gruenbacher:
      
       - Don't update inode timestamps for direct writes (performance
         regression fix)
      
       - Skip no-op quota records instead of panicing
      
       - Fix a RCU race in gfs2_permission()
      
       - Various other smaller fixes and cleanups all over the place
      
      * tag 'gfs2-v6.6-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: (24 commits)
        gfs2: don't withdraw if init_threads() got interrupted
        gfs2: remove dead code in add_to_queue
        gfs2: Fix slab-use-after-free in gfs2_qd_dealloc
        gfs2: Silence "suspicious RCU usage in gfs2_permission" warning
        gfs2: fs: derive f_fsid from s_uuid
        gfs2: No longer use 'extern' in function declarations
        gfs2: Rename gfs2_lookup_{ simple => meta }
        gfs2: Convert gfs2_internal_read to folios
        gfs2: Convert stuffed_readpage to folios
        gfs2: Minor gfs2_write_jdata_batch PAGE_SIZE cleanup
        gfs2: Get rid of gfs2_alloc_blocks generation parameter
        gfs2: Add metapath_dibh helper
        gfs2: Clean up quota.c:print_message
        gfs2: Clean up gfs2_alloc_parms initializers
        gfs2: Two quota=account mode fixes
        gfs2: Stop using GFS2_BASIC_BLOCK and GFS2_BASIC_BLOCK_SHIFT
        gfs2: setattr_chown: Add missing initialization
        gfs2: fix an oops in gfs2_permission
        gfs2: ignore negated quota changes
        gfs2: Don't update inode timestamps for direct writes
        ...
      1a0507d8
    • Linus Torvalds's avatar
      Merge tag 'ovl-update-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs · 7f851936
      Linus Torvalds authored
      Pull overlayfs updates from Amir Goldstein:
      
       - Overlayfs aio cleanups and fixes
      
         Cleanups and minor fixes in preparation for factoring out of
         read/write passthrough code.
      
       - Overlayfs lock ordering changes
      
         Hold mnt_writers only throughout copy up instead of a long lived
         elevated refcount.
      
       - Add support for nesting overlayfs private xattrs
      
         There are cases where you want to use an overlayfs mount as a
         lowerdir for another overlayfs mount. For example, if the system
         rootfs is on overlayfs due to composefs, or to make it volatile (via
         tmpfs), then you cannot currently store a lowerdir on the rootfs,
         because the inner overlayfs will eat all the whiteouts and overlay
         xattrs. This means you can't e.g. store on the rootfs a prepared
         container image for use with overlayfs.
      
         This adds support for nesting of overlayfs mounts by escaping the
         problematic features and unescaping them when exposing to the
         overlayfs user.
      
       - Add new mount options for appending lowerdirs
      
      * tag 'ovl-update-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs:
        ovl: add support for appending lowerdirs one by one
        ovl: refactor layer parsing helpers
        ovl: store and show the user provided lowerdir mount option
        ovl: remove unused code in lowerdir param parsing
        ovl: Add documentation on nesting of overlayfs mounts
        ovl: Add an alternative type of whiteout
        ovl: Support escaped overlay.* xattrs
        ovl: Add OVL_XATTR_TRUSTED/USER_PREFIX_LEN macros
        ovl: Move xattr support to new xattrs.c file
        ovl: do not encode lower fh with upper sb_writers held
        ovl: do not open/llseek lower file with upper sb_writers held
        ovl: reorder ovl_want_write() after ovl_inode_lock()
        ovl: split ovl_want_write() into two helpers
        ovl: add helper ovl_file_modified()
        ovl: protect copying of realinode attributes to ovl inode
        ovl: punt write aio completion to workqueue
        ovl: propagate IOCB_APPEND flag on writes to realfile
        ovl: use simpler function to convert iocb to rw flags
      7f851936
    • Linus Torvalds's avatar
      Merge tag 'bcachefs-2023-11-5' of https://evilpiepirate.org/git/bcachefs · c9d01179
      Linus Torvalds authored
      Pull more bcachefs updates from Kent Overstreet:
       "Here's the second big bcachefs pull request. This brings your tree up
        to date with my master branch, which is what existing bcachefs users
        are currently running.
      
        New features:
         - rebalance_work btree (and metadata version 1.3): the rebalance
           thread no longer has to scan to find extents that need processing -
           big scalability improvement.
         - sb_errors superblock section: this adds counters for each fsck
           error type, since filesystem creation, along with the date of the
           most recent error. It'll get us better bug reports (since users do
           not typically report errors that fsck was able to fix), and I might
           add telemetry for this in the future.
      
        Fixes include:
         - multiple snapshot deletion fixes
         - members_v2 fixups
         - deleted_inodes btree fixes
         - copygc thread no longer spins when a device is full but has no
           fragmented buckets (i.e. rebalance needs to move data around
           instead)
         - a fix for a memory reclaim issue with the btree key cache: we're
           now careful not to hold the srcu read lock that blocks key cache
           reclaim for too long
         - an early allocator locking fix, from Brian
         - endianness fixes, from Brian
         - CONFIG_BCACHEFS_DEBUG_TRANSACTIONS no longer defaults to y, a big
           performance improvement on multithreaded workloads"
      
      * tag 'bcachefs-2023-11-5' of https://evilpiepirate.org/git/bcachefs: (70 commits)
        bcachefs: Improve stripe checksum error message
        bcachefs: Simplify, fix bch2_backpointer_get_key()
        bcachefs: kill thing_it_points_to arg to backpointer_not_found()
        bcachefs: bch2_ec_read_extent() now takes btree_trans
        bcachefs: bch2_stripe_to_text() now prints ptr gens
        bcachefs: Don't iterate over journal entries just for btree roots
        bcachefs: Break up bch2_journal_write()
        bcachefs: Replace ERANGE with private error codes
        bcachefs: bkey_copy() is no longer a macro
        bcachefs: x-macro-ify inode flags enum
        bcachefs: Convert bch2_fs_open() to darray
        bcachefs: Move __bch2_members_v2_get_mut to sb-members.h
        bcachefs: bch2_prt_datetime()
        bcachefs: CONFIG_BCACHEFS_DEBUG_TRANSACTIONS no longer defaults to y
        bcachefs: Add a comment for BTREE_INSERT_NOJOURNAL usage
        bcachefs: rebalance_work btree is not a snapshots btree
        bcachefs: Add missing printk newlines
        bcachefs: Fix recovery when forced to use JSET_NO_FLUSH journal entry
        bcachefs: .get_parent() should return an error pointer
        bcachefs: Fix bch2_delete_dead_inodes()
        ...
      c9d01179
    • Amir Goldstein's avatar
      MAINTAINERS: create an entry for exportfs · 4ad714df
      Amir Goldstein authored
      Split the exportfs entry from the nfsd entry and add myself as reviewer.
      Suggested-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Acked-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Acked-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
      Link: https://lore.kernel.org/r/20231026205553.143556-1-amir73il@gmail.comSigned-off-by: default avatarChristian Brauner <brauner@kernel.org>
      4ad714df
    • Christian Brauner's avatar
      iomap: rename iomap entry · 64bc7eee
      Christian Brauner authored
      Since this is now part of the vfs trees rename it accordingly and remove
      the old tree referencing xfs.
      Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
      64bc7eee
  2. 06 Nov, 2023 14 commits
    • Linus Torvalds's avatar
      Merge tag 'media/v6.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · be3ca57c
      Linus Torvalds authored
      Pull media updates from Mauro Carvalho Chehab:
      
       - the old V4L2 core videobuf kAPI was finally removed. All media
         drivers should now be using VB2 kAPI
      
       - new automotive driver: mgb4
      
       - new platform video driver: npcm-video
      
       - new sensor driver: mt9m114
      
       - new TI driver used in conjunction with Cadence CSI2RX IP to bridge
         TI-specific parts
      
       - ir-rx51 was removed and the N900 DT binding was moved to the
         pwm-ir-tx generic driver
      
       - drop atomisp-specific ov5693, using the upstream driver instead
      
       - the camss driver has gained RDI3 support for VFE 17x
      
       - the atomisp driver now detects ISP2400 or ISP2401 at run time. No
         need to set it up at build time anymore
      
       - lots of driver fixes, cleanups and improvements
      
      * tag 'media/v6.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (377 commits)
        media: nuvoton: VIDEO_NPCM_VCD_ECE should depend on ARCH_NPCM
        media: venus: Fix firmware path for resources
        media: venus: hfi_cmds: Replace one-element array with flex-array member and use __counted_by
        media: venus: hfi_parser: Add check to keep the number of codecs within range
        media: venus: hfi: add checks to handle capabilities from firmware
        media: venus: hfi: fix the check to handle session buffer requirement
        media: venus: hfi: add checks to perform sanity on queue pointers
        media: platform: cadence: select MIPI_DPHY dependency
        media: MAINTAINERS: Fix path for J721E CSI2RX bindings
        media: cec: meson: always include meson sub-directory in Makefile
        media: videobuf2: Fix IS_ERR checking in vb2_dc_put_userptr()
        media: platform: mtk-mdp3: fix uninitialized variable in mdp_path_config()
        media: mediatek: vcodec: using encoder device to alloc/free encoder memory
        media: imx-jpeg: notify source chagne event when the first picture parsed
        media: cx231xx: Use EP5_BUF_SIZE macro
        media: siano: Drop unnecessary error check for debugfs_create_dir/file()
        media: mediatek: vcodec: Handle invalid encoder vsi
        media: aspeed: Drop unnecessary error check for debugfs_create_file()
        Documentation: media: buffer.rst: fix V4L2_BUF_FLAG_PREPARED
        Documentation: media: gen-errors.rst: fix confusing ENOTTY description
        ...
      be3ca57c
    • Linus Torvalds's avatar
      Merge tag 'rtc-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · d2f51b35
      Linus Torvalds authored
      Pull RTC updates from Alexandre Belloni:
       "There is a new driver for the RTC of the Mstar SSD202D SoC. The
        rtc7301 driver gains support for byte addresses to support the
        USRobotics USR8200. Then we have many non user visible changes and
        typo fixes.
      
        Summary:
      
        Subsytem:
         - convert platform drivers to remove_new
         - prevent modpost warnings for unremovable platform drivers
      
        New driver:
         - Mstar SSD202D
      
        Drivers:
         - brcmstb-waketimer: support level alarm_irq
         - ep93xx: add DT support
         - rtc7301: support byte-addressed IO"
      
      * tag 'rtc-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (28 commits)
        dt-bindings: rtc: Add Mstar SSD202D RTC
        rtc: Add support for the SSD202D RTC
        rtc: at91rm9200: annotate at91_rtc_remove with __exit again
        dt-bindings: rtc: microcrystal,rv3032: Document wakeup-source property
        dt-bindings: rtc: pcf8523: Convert to YAML
        dt-bindings: rtc: mcp795: move to trivial-rtc
        rtc: ep93xx: add DT support for Cirrus EP93xx
        dt-bindings: rtc: Add Cirrus EP93xx
        dt-bindings: rtc: pcf2123: convert to YAML
        rtc: efi: fixed typo in efi_procfs()
        rtc: omap: Use device_get_match_data()
        rtc: pcf85363: fix wrong mask/val parameters in regmap_update_bits call
        rtc: rtc7301: Support byte-addressed IO
        rtc: rtc7301: Rewrite bindings in schema
        rtc: sh: Convert to platform remove callback returning void
        rtc: pxa: Convert to platform remove callback returning void
        rtc: mv: Convert to platform remove callback returning void
        rtc: imxdi: Convert to platform remove callback returning void
        rtc: at91rm9200: Convert to platform remove callback returning void
        rtc: pcap: Drop no-op remove function
        ...
      d2f51b35
    • Linus Torvalds's avatar
      Merge tag 'mailbox-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox · 7b2c9e41
      Linus Torvalds authored
      Pull mailbox updates from Jassi Brar:
      
       - imx: add support for TX Doorbell v2
      
       - mtk: implement runtime PM
      
       - zynqmp: add destination mailbox compatible
      
       - qcom:
          - add another clock provider for IPQ
          - add SM8650 compatible
      
       - misc: use preferred device_get_match_data()
      
      * tag 'mailbox-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox:
        dt-bindings: mailbox: qcom-ipcc: document the SM8650 Inter-Processor Communication Controller
        mailbox: mtk-cmdq-mailbox: Implement Runtime PM with autosuspend
        mailbox: Use device_get_match_data()
        dt-bindings: zynqmp: add destination mailbox compatible
        dt-bindings: mailbox: qcom: add one more clock provider for IPQ mailbox
        mailbox: imx: support channel type tx doorbell v2
        dt-bindings: mailbox: fsl,mu: add new tx doorbell channel
      7b2c9e41
    • Andreas Gruenbacher's avatar
      gfs2: don't withdraw if init_threads() got interrupted · 0cdc6f44
      Andreas Gruenbacher authored
      In gfs2_fill_super(), when mounting a gfs2 filesystem is interrupted,
      kthread_create() can return -EINTR.  When that happens, we roll back
      what has already been done and abort the mount.
      
      Since commit 62dd0f98 ("gfs2: Flag a withdraw if init_threads()
      fails), we are calling gfs2_withdraw_delayed() in gfs2_fill_super();
      first via gfs2_make_fs_rw(), then directly.  But gfs2_withdraw_delayed()
      only marks the filesystem as withdrawing and relies on a caller further
      up the stack to do the actual withdraw, which doesn't exist in the
      gfs2_fill_super() case.  Because the filesystem is marked as withdrawing
      / withdrawn, function gfs2_lm_unmount() doesn't release the dlm
      lockspace, so when we try to mount that filesystem again, we get:
      
          gfs2: fsid=gohan:gohan0: Trying to join cluster "lock_dlm", "gohan:gohan0"
          gfs2: fsid=gohan:gohan0: dlm_new_lockspace error -17
      
      Since commit b77b4a48 ("gfs2: Rework freeze / thaw logic"), the
      deadlock this gfs2_withdraw_delayed() call was supposed to work around
      cannot occur anymore because freeze_go_callback() won't take the
      sb->s_umount semaphore unconditionally anymore, so we can get rid of the
      gfs2_withdraw_delayed() in gfs2_fill_super() entirely.
      Reported-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      Cc: stable@vger.kernel.org # v6.5+
      0cdc6f44
    • Su Hui's avatar
      gfs2: remove dead code in add_to_queue · bb25b975
      Su Hui authored
      clang static analyzer complains that value stored to 'gh' is never read.
      The code of this line is useless after commit 0b93bac2
      ("gfs2: Remove LM_FLAG_PRIORITY flag"). Remove this code to save space.
      Signed-off-by: default avatarSu Hui <suhui@nfschina.com>
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      bb25b975
    • Juntong Deng's avatar
      gfs2: Fix slab-use-after-free in gfs2_qd_dealloc · bdcb8aa4
      Juntong Deng authored
      In gfs2_put_super(), whether withdrawn or not, the quota should
      be cleaned up by gfs2_quota_cleanup().
      
      Otherwise, struct gfs2_sbd will be freed before gfs2_qd_dealloc (rcu
      callback) has run for all gfs2_quota_data objects, resulting in
      use-after-free.
      
      Also, gfs2_destroy_threads() and gfs2_quota_cleanup() is already called
      by gfs2_make_fs_ro(), so in gfs2_put_super(), after calling
      gfs2_make_fs_ro(), there is no need to call them again.
      
      Reported-by: syzbot+29c47e9e51895928698c@syzkaller.appspotmail.com
      Closes: https://syzkaller.appspot.com/bug?extid=29c47e9e51895928698cSigned-off-by: default avatarJuntong Deng <juntong.deng@outlook.com>
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      bdcb8aa4
    • Andreas Gruenbacher's avatar
      gfs2: Silence "suspicious RCU usage in gfs2_permission" warning · 074d7306
      Andreas Gruenbacher authored
      Commit 0abd1557 added rcu_dereference() for dereferencing ip->i_gl
      in gfs2_permission.  This now causes lockdep to complain when
      gfs2_permission is called in non-RCU context:
      
          WARNING: suspicious RCU usage in gfs2_permission
      
      Switch to rcu_dereference_check() and check for the MAY_NOT_BLOCK flag
      to shut up lockdep when we know that dereferencing ip->i_gl is safe.
      
      Fixes: 0abd1557 ("gfs2: fix an oops in gfs2_permission")
      Reported-by: syzbot+3e5130844b0c0e2b4948@syzkaller.appspotmail.com
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      074d7306
    • Amir Goldstein's avatar
      gfs2: fs: derive f_fsid from s_uuid · d6fc6c93
      Amir Goldstein authored
      gfs2 already has optional persistent uuid.
      
      Use that uuid to report f_fsid in statfs(2), same as ext2/ext4/zonefs.
      
      This allows gfs2 to be monitored by fanotify filesystem watch.
      for example, with inotify-tools 4.23.8.0, the following command can be
      used to watch changes over entire filesystem:
      
        fsnotifywatch --filesystem /mnt/gfs2
      Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      d6fc6c93
    • Andreas Gruenbacher's avatar
      gfs2: No longer use 'extern' in function declarations · 0b2355fe
      Andreas Gruenbacher authored
      For non-static function declarations, external linkage is implied and
      the 'extern' keyword isn't needed.  Some static checkers complain about
      the overuse of 'extern', so clean up all the function declarations.
      
      In addition, remove 'extern' from the definition of
      free_local_statfs_inodes(); it isn't needed there, either.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      0b2355fe
    • Andreas Gruenbacher's avatar
      gfs2: Rename gfs2_lookup_{ simple => meta } · 062fb903
      Andreas Gruenbacher authored
      Function gfs2_lookup_simple() is used for looking up inodes in the
      metadata directory tree, so rename it to gfs2_lookup_meta() to closer
      match its purpose.  Clean the function up a little on the way.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      062fb903
    • Andreas Gruenbacher's avatar
      gfs2: Convert gfs2_internal_read to folios · be7f6a6b
      Andreas Gruenbacher authored
      Change gfs2_internal_read() to use folios.  Convert sizes to size_t.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      be7f6a6b
    • Andreas Gruenbacher's avatar
      gfs2: Convert stuffed_readpage to folios · 7fa4964b
      Andreas Gruenbacher authored
      Change stuffed_readpage() to take a folio instead of a page.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      7fa4964b
    • Andreas Gruenbacher's avatar
      gfs2: Minor gfs2_write_jdata_batch PAGE_SIZE cleanup · d6d64dac
      Andreas Gruenbacher authored
      In gfs2_write_jdata_batch(), to compute the number of blocks, compute
      the total size of the folio batch instead of the number of pages it
      contains.  Not a functional change.
      
      Note that we don't currently allow mounting filesystems with a block
      size bigger than the page size.  We could change that after converting
      the page cache to folios.  The page cache would then only contain
      block-size or bigger folios, so rounding wouldn't become an issue here.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      d6d64dac
    • Andreas Gruenbacher's avatar
      gfs2: Get rid of gfs2_alloc_blocks generation parameter · 4c7b3f7f
      Andreas Gruenbacher authored
      Get rid of the generation parameter of gfs2_alloc_blocks(): we only ever
      set the generation of the current inode while creating it, so do so
      directly.
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      4c7b3f7f
  3. 05 Nov, 2023 19 commits