[f2fs-dev] circular locking dependency warning in f2fs

2023-08-15 Thread Guenter Roeck
Hi, when trying to boot from an f2fs file system with lock debugging enabled, I get the attached circular locking dependency warning. Is this a known problem ? Thanks, Guenter --- [ 10.315522] == [ 10.315620] WARNING: possible circular lock

[f2fs-dev] [PATCH v6 2/9] 9p: Split ->weak_revalidate from ->revalidate

2023-08-15 Thread Gabriel Krisman Bertazi
In preparation to change the signature of dentry_ops->revalidate, avoid reusing the handler directly for d_weak_revalidate in 9p. Signed-off-by: Gabriel Krisman Bertazi --- fs/9p/vfs_dentry.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fs/9p/vfs_dentry.c b/fs/9p/vf

[f2fs-dev] [PATCH v6 8/9] ext4: Enable negative dentries on case-insensitive lookup

2023-08-15 Thread Gabriel Krisman Bertazi
From: Gabriel Krisman Bertazi Instead of invalidating negative dentries during case-insensitive lookups, mark them as such and let them be added to the dcache. d_ci_revalidate is able to properly filter them out if necessary based on the dentry casefold flag. Signed-off-by: Gabriel Krisman Berta

[f2fs-dev] [PATCH v6 3/9] fs: Expose name under lookup to d_revalidate hooks

2023-08-15 Thread Gabriel Krisman Bertazi
From: Gabriel Krisman Bertazi Negative dentries support on case-insensitive ext4/f2fs will require access to the name under lookup to ensure it matches the dentry. This adds the information on d_revalidate and updates its implementation. This was done through a Coccinelle hook and tested by bui

[f2fs-dev] [PATCH v6 5/9] libfs: Validate negative dentries in case-insensitive directories

2023-08-15 Thread Gabriel Krisman Bertazi
From: Gabriel Krisman Bertazi Introduce a dentry revalidation helper to check the negative dentries of case-insensitive filesystems. This helper is based on the fact that a negative dentry might safe to be reused on a casefolded directory if it was created during a case-insensitive lookup, becau

[f2fs-dev] [PATCH v6 1/9] ecryptfs: Reject casefold directory inodes

2023-08-15 Thread Gabriel Krisman Bertazi
Even though it seems to be able to resolve some names of case-insensitive directories, the lack of d_hash and d_compare means we end up with a broken state in the d_cache. Considering it was never a goal to support these two together, and we are preparing to use d_revalidate in case-insensitive fi

[f2fs-dev] [PATCH v6 7/9] libfs: Merge encrypted_ci_dentry_ops and ci_dentry_ops

2023-08-15 Thread Gabriel Krisman Bertazi
From: Gabriel Krisman Bertazi Now that casefold needs d_revalidate and calls fscrypt_d_revalidate itself, generic_encrypt_ci_dentry_ops and generic_ci_dentry_ops are now equivalent. Merge them together and simplify the setup code. Signed-off-by: Gabriel Krisman Bertazi --- changes since v2:

[f2fs-dev] [PATCH v6 9/9] f2fs: Enable negative dentries on case-insensitive lookup

2023-08-15 Thread Gabriel Krisman Bertazi
From: Gabriel Krisman Bertazi Instead of invalidating negative dentries during case-insensitive lookups, mark them as such and let them be added to the dcache. d_ci_revalidate is able to properly filter them out if necessary based on the dentry casefold flag. Signed-off-by: Gabriel Krisman Berta

[f2fs-dev] [PATCH v6 0/9] Support negative dentries on case-insensitive ext4 and f2fs

2023-08-15 Thread Gabriel Krisman Bertazi
Hi, This is v6 of the negative dentry on case-insensitive directories. Thanks Eric for the review of the last iteration. This version drops the patch to expose the helper to check casefolding directories, since it is not necessary in ecryptfs and it might be going away. It also addresses some do

[f2fs-dev] [PATCH v6 4/9] fs: Add DCACHE_CASEFOLDED_NAME flag

2023-08-15 Thread Gabriel Krisman Bertazi
From: Gabriel Krisman Bertazi This flag marks a negative or positive dentry as being created after a case-insensitive lookup operation. It is useful to differentiate dentries this way to detect whether the negative dentry can be trusted during a case-insensitive lookup. Reviewed-by: Theodore Ts

[f2fs-dev] [PATCH v6 6/9] libfs: Chain encryption checks after case-insensitive revalidation

2023-08-15 Thread Gabriel Krisman Bertazi
From: Gabriel Krisman Bertazi Support encrypted dentries in generic_ci_d_revalidate by chaining fscrypt_d_revalidate at the tail of the d_revalidate. This allows filesystem to just call generic_ci_d_revalidate and let it handle any case-insensitive dentry (encrypted or not). Signed-off-by: Gabr

Re: [f2fs-dev] [PATCH 1/1] ANDROID: f2fs: Support Block Size == Page Size

2023-08-15 Thread kernel test robot
Hi Daniel, kernel test robot noticed the following build warnings: [auto build test WARNING on 0cc81b1ad51287847e494e055e5d3426f95e7921] url: https://github.com/intel-lab-lkp/linux/commits/Daniel-Rosenberg/ANDROID-f2fs-Support-Block-Size-Page-Size/20230816-091721 base: 0cc81b1ad51287847e49

Re: [f2fs-dev] [PATCH 0/1] Add 16K Support for f2fs

2023-08-15 Thread Eric Biggers
On Tue, Aug 15, 2023 at 06:14:31PM -0700, Daniel Rosenberg via Linux-f2fs-devel wrote: > F2fs filesystems currently have two large restrictions around block size. > The block size must equal the page size, and the block size must be 4096. > > The following patch, along with the associated f2fs-to

[f2fs-dev] [PATCH 7/7] f2fs-tools: Support different block sizes

2023-08-15 Thread Daniel Rosenberg via Linux-f2fs-devel
This adds support for 4K and 16K block size using the same binary. mkfs can choose block size via the -b option, with other tools getting the blocksize from the superblock. On mount time, we can't rely on block size for the location for the superblock, since that information is in the superblock.

[f2fs-dev] [PATCH 0/7] Add 16K Support for f2fs-tools

2023-08-15 Thread Daniel Rosenberg via Linux-f2fs-devel
This adds support for different block sizes to f2fs-tools. The first patch redefines all block size based constants to be based on the block size. After this patch, you should be able to compile a version of f2fs-tools that works for a given blocksize by just setting F2FS_BLKSIZE_BITS in f2fs_fs.h

[f2fs-dev] [PATCH 6/7] f2fs-tools: Refactor f2fs_dentry_block struct

2023-08-15 Thread Daniel Rosenberg via Linux-f2fs-devel
This moves access to f2fs_dentry_block's dentry list and filename list behind a macro, as their locations depend on block size. Since struct f2fs_dentry_block no longer represents the full block, use F2FS_BLKSIZE instead of sizeof(struct f2fs_dentry_block) Signed-off-by: Daniel Rosenberg --- fs

[f2fs-dev] [PATCH 1/1] ANDROID: f2fs: Support Block Size == Page Size

2023-08-15 Thread Daniel Rosenberg via Linux-f2fs-devel
This allows f2fs to support cases where the block size = page size for both 4K and 16K block sizes. Other sizes should work as well, should the need arise. This does not currently support 4K Block size filesystems if the page size is 16K. Signed-off-by: Daniel Rosenberg --- fs/f2fs/data.c

[f2fs-dev] [PATCH 0/1] Add 16K Support for f2fs

2023-08-15 Thread Daniel Rosenberg via Linux-f2fs-devel
F2fs filesystems currently have two large restrictions around block size. The block size must equal the page size, and the block size must be 4096. The following patch, along with the associated f2fs-tools patch set, relax the latter restriction, allowing you to use 16K block size f2fs on a 16K pa

[f2fs-dev] [PATCH 5/7] f2fs-tools: Refactor Summary block struct and friends

2023-08-15 Thread Daniel Rosenberg via Linux-f2fs-devel
This splits off access to the summary block's journal and footer into a macro call, as their location is dependent on block size. Because of this you should use F2FS_BLKSIZE instead of sizeof(struct summary_block) Signed-off-by: Daniel Rosenberg --- fsck/f2fs.h| 4 +-- fsck/fsck.c

[f2fs-dev] [PATCH 2/7] f2fs-tools: Refactor Orphan Block struct

2023-08-15 Thread Daniel Rosenberg via Linux-f2fs-devel
This splits off access to the orphan block's footer into a macro call as its location is dependent on block size. Because of this, you should use F2FS_BLKSIZE instead of sizeof(struct f2fs_orphan_block) Signed-off-by: Daniel Rosenberg --- fsck/fsck.c | 4 ++-- fsck/main.c | 1 + in

[f2fs-dev] [PATCH 4/7] f2fs-tools: Refactor SIT/NAT block structs

2023-08-15 Thread Daniel Rosenberg via Linux-f2fs-devel
This converts f2fs_nat_block and f2fs_sit_block to be variable length arrays. This does not change the way they are accessed, but removes a misleading statment that these sizes are fixed, as opposed to deriving from F2FS_BLKSIZE Signed-off-by: Daniel Rosenberg --- include/f2fs_fs.h | 20

[f2fs-dev] [PATCH 1/7] f2fs-tools: Define constants in terms of BLKSIZE

2023-08-15 Thread Daniel Rosenberg via Linux-f2fs-devel
This converts the various block size based constants to be defined in terms of the block size. This makes it possible to change the block size by changing only F2FS_BLKSIZE_BITS in f2fs_fs.h Signed-off-by: Daniel Rosenberg --- fsck/fsck.h | 2 +- fsck/mount.c| 4 +- inc

[f2fs-dev] [PATCH 3/7] f2fs-tools: Refactor f2fs_node struct and friends

2023-08-15 Thread Daniel Rosenberg via Linux-f2fs-devel
This converts inodes, direct nodes, and indirect nodes over to not being based on a 4K page size. f2fs_inode's i_nids field should now be accessed via a macro, as it's location depends on block size. Access to direct nodes and indirect nodes is unchanged. The node footer's location is also based

[f2fs-dev] [PATCH] f2fs_io: add do_clearflags to clear nocompress/compress flag

2023-08-15 Thread Qi Han via Linux-f2fs-devel
To align f2fs_io functionality with chattr +/-c and +/-m, the do_clearflags function has been added to clear the FS_COMPR_FL and FS_NOCOMP_FL flags. Signed-off-by: Qi Han --- man/f2fs_io.8 | 4 tools/f2fs_io/f2fs_io.c | 37 + 2 files changed, 4

Re: [f2fs-dev] [PATCH v4 01/48] mm: move some shrinker-related function declarations to mm/internal.h

2023-08-15 Thread Qi Zheng via Linux-f2fs-devel
On 2023/8/15 16:36, Muchun Song wrote: On Aug 7, 2023, at 19:08, Qi Zheng wrote: The following functions are only used inside the mm subsystem, so it's better to move their declarations to the mm/internal.h file. 1. shrinker_debugfs_add() 2. shrinker_debugfs_detach() 3. shrinker_debugfs_

Re: [f2fs-dev] [PATCH v4 12/48] gfs2: dynamically allocate the gfs2-qd shrinker

2023-08-15 Thread Muchun Song
> On Aug 7, 2023, at 19:09, Qi Zheng wrote: > > Use new APIs to dynamically allocate the gfs2-qd shrinker. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://l

Re: [f2fs-dev] [PATCH v4 02/48] mm: vmscan: move shrinker-related code into a separate file

2023-08-15 Thread Muchun Song
> On Aug 7, 2023, at 19:08, Qi Zheng wrote: > > The mm/vmscan.c file is too large, so separate the shrinker-related > code from it into a separate file. No functional changes. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song ___ Linux-f2fs

Re: [f2fs-dev] [PATCH v4 01/48] mm: move some shrinker-related function declarations to mm/internal.h

2023-08-15 Thread Muchun Song
> On Aug 7, 2023, at 19:08, Qi Zheng wrote: > > The following functions are only used inside the mm subsystem, so it's > better to move their declarations to the mm/internal.h file. > > 1. shrinker_debugfs_add() > 2. shrinker_debugfs_detach() > 3. shrinker_debugfs_remove() > > Signed-off-by: