1. 24 9月, 2022 6 次提交
  2. 14 9月, 2022 4 次提交
  3. 13 9月, 2022 2 次提交
  4. 09 9月, 2022 2 次提交
    • N
      NFSD: fix regression with setting ACLs. · 00801cd9
      NeilBrown 提交于
      A recent patch moved ACL setting into nfsd_setattr().
      Unfortunately it didn't work as nfsd_setattr() aborts early if
      iap->ia_valid is 0.
      
      Remove this test, and instead avoid calling notify_change() when
      ia_valid is 0.
      
      This means that nfsd_setattr() will now *always* lock the inode.
      Previously it didn't if only a ATTR_MODE change was requested on a
      symlink (see Commit 15b7a1b8 ("[PATCH] knfsd: fix setattr-on-symlink
      error return")). I don't think this change really matters.
      
      Fixes: c0cbe707 ("NFSD: add posix ACLs to struct nfsd_attrs")
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Reviewed-by: NJeff Layton <jlayton@kernel.org>
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      00801cd9
    • B
      tracefs: Only clobber mode/uid/gid on remount if asked · 47311db8
      Brian Norris 提交于
      Users may have explicitly configured their tracefs permissions; we
      shouldn't overwrite those just because a second mount appeared.
      
      Only clobber if the options were provided at mount time.
      
      Note: the previous behavior was especially surprising in the presence of
      automounted /sys/kernel/debug/tracing/.
      
      Existing behavior:
      
        ## Pre-existing status: tracefs is 0755.
        # stat -c '%A' /sys/kernel/tracing/
        drwxr-xr-x
      
        ## (Re)trigger the automount.
        # umount /sys/kernel/debug/tracing
        # stat -c '%A' /sys/kernel/debug/tracing/.
        drwx------
      
        ## Unexpected: the automount changed mode for other mount instances.
        # stat -c '%A' /sys/kernel/tracing/
        drwx------
      
      New behavior (after this change):
      
        ## Pre-existing status: tracefs is 0755.
        # stat -c '%A' /sys/kernel/tracing/
        drwxr-xr-x
      
        ## (Re)trigger the automount.
        # umount /sys/kernel/debug/tracing
        # stat -c '%A' /sys/kernel/debug/tracing/.
        drwxr-xr-x
      
        ## Expected: the automount does not change other mount instances.
        # stat -c '%A' /sys/kernel/tracing/
        drwxr-xr-x
      
      Link: https://lkml.kernel.org/r/20220826174353.2.Iab6e5ea57963d6deca5311b27fb7226790d44406@changeid
      
      Cc: stable@vger.kernel.org
      Fixes: 4282d606 ("tracefs: Add new tracefs file system")
      Signed-off-by: NBrian Norris <briannorris@chromium.org>
      Signed-off-by: NSteven Rostedt (Google) <rostedt@goodmis.org>
      47311db8
  5. 08 9月, 2022 1 次提交
  6. 07 9月, 2022 1 次提交
  7. 06 9月, 2022 1 次提交
    • Q
      btrfs: fix the max chunk size and stripe length calculation · 5da431b7
      Qu Wenruo 提交于
      [BEHAVIOR CHANGE]
      Since commit f6fca391 ("btrfs: store chunk size in space-info
      struct"), btrfs no longer can create larger data chunks than 1G:
      
        mkfs.btrfs -f -m raid1 -d raid0 $dev1 $dev2 $dev3 $dev4
        mount $dev1 $mnt
      
        btrfs balance start --full $mnt
        btrfs balance start --full $mnt
        umount $mnt
      
        btrfs ins dump-tree -t chunk $dev1 | grep "DATA|RAID0" -C 2
      
      Before that offending commit, what we got is a 4G data chunk:
      
      	item 6 key (FIRST_CHUNK_TREE CHUNK_ITEM 9492758528) itemoff 15491 itemsize 176
      		length 4294967296 owner 2 stripe_len 65536 type DATA|RAID0
      		io_align 65536 io_width 65536 sector_size 4096
      		num_stripes 4 sub_stripes 1
      
      Now what we got is only 1G data chunk:
      
      	item 6 key (FIRST_CHUNK_TREE CHUNK_ITEM 6271533056) itemoff 15491 itemsize 176
      		length 1073741824 owner 2 stripe_len 65536 type DATA|RAID0
      		io_align 65536 io_width 65536 sector_size 4096
      		num_stripes 4 sub_stripes 1
      
      This will increase the number of data chunks by the number of devices,
      not only increase system chunk usage, but also greatly increase mount
      time.
      
      Without a proper reason, we should not change the max chunk size.
      
      [CAUSE]
      Previously, we set max data chunk size to 10G, while max data stripe
      length to 1G.
      
      Commit f6fca391 ("btrfs: store chunk size in space-info struct")
      completely ignored the 10G limit, but use 1G max stripe limit instead,
      causing above shrink in max data chunk size.
      
      [FIX]
      Fix the max data chunk size to 10G, and in decide_stripe_size_regular()
      we limit stripe_size to 1G manually.
      
      This should only affect data chunks, as for metadata chunks we always
      set the max stripe size the same as max chunk size (256M or 1G
      depending on fs size).
      
      Now the same script result the same old result:
      
      	item 6 key (FIRST_CHUNK_TREE CHUNK_ITEM 9492758528) itemoff 15491 itemsize 176
      		length 4294967296 owner 2 stripe_len 65536 type DATA|RAID0
      		io_align 65536 io_width 65536 sector_size 4096
      		num_stripes 4 sub_stripes 1
      Reported-by: NWang Yugui <wangyugui@e16-tech.com>
      Fixes: f6fca391 ("btrfs: store chunk size in space-info struct")
      Signed-off-by: NQu Wenruo <wqu@suse.com>
      Reviewed-by: NDavid Sterba <dsterba@suse.com>
      Signed-off-by: NDavid Sterba <dsterba@suse.com>
      5da431b7
  8. 05 9月, 2022 7 次提交
  9. 01 9月, 2022 2 次提交
  10. 31 8月, 2022 4 次提交
  11. 29 8月, 2022 6 次提交
  12. 25 8月, 2022 4 次提交