On 2021/6/8 7:47, Eric Biggers wrote:
On Tue, Jun 08, 2021 at 07:27:15AM +0800, Chao Yu wrote:
From: Chao Yu
Add a slab cache: "f2fs_casefold_name_entry" for memory allocation
of casefold name.
Signed-off-by: Chao Yu
---
fs/f2fs/dir.c | 16 ++--
fs/f2fs/recovery.c | 6 ++
From: Chao Yu
Add a slab cache: "f2fs_casefold_name" for memory allocation
of casefold name.
Signed-off-by: Chao Yu
---
v2:
- change slab cache name to "f2fs_casefolded_name"
- add a "f2fs_" prefix for slab cache variable name
fs/f2fs/dir.c | 17 +++--
fs/f2fs/recovery.c | 6
On Tue, Jun 08, 2021 at 07:27:15AM +0800, Chao Yu wrote:
> From: Chao Yu
>
> Add a slab cache: "f2fs_casefold_name_entry" for memory allocation
> of casefold name.
>
> Signed-off-by: Chao Yu
> ---
> fs/f2fs/dir.c | 16 ++--
> fs/f2fs/recovery.c | 6 +-
> fs/f2fs/super.c
Still no time to check this?
Thanks,
On 2021/6/4 0:00, Chao Yu wrote:
Jaegeuk,
Any comments on this patch?
On 2021/6/1 18:10, Chao Yu wrote:
[1]
https://www.mail-archive.com/linux-f2fs-devel@lists.sourceforge.net/msg15126.html
As [1] reported, if lower device doesn't support write barrier,
From: Chao Yu
Otherwise whole section after tab will be invisible in compiled
html format document.
Cc: Mauro Carvalho Chehab
Fixes: 89272ca1102e ("docs: filesystems: convert f2fs.txt to ReST")
Signed-off-by: Chao Yu
---
Documentation/filesystems/f2fs.rst | 16
1 file changed
From: Chao Yu
Add a slab cache: "f2fs_casefold_name_entry" for memory allocation
of casefold name.
Signed-off-by: Chao Yu
---
fs/f2fs/dir.c | 16 ++--
fs/f2fs/recovery.c | 6 +-
fs/f2fs/super.c| 24
3 files changed, 39 insertions(+), 7 deletio
On 2021/6/8 0:56, Jaegeuk Kim wrote:
On 06/06, Chao Yu wrote:
On 2021/5/26 4:49, Jaegeuk Kim wrote:
Once we release compressed blocks, we used to set IMMUTABLE bit. But it turned
out it disallows every fs operations which we don't need for compression.
Let's just prevent writing data only.
Si
On 2021/6/8 0:52, Jaegeuk Kim wrote:
On 06/06, Chao Yu wrote:
On 2021/5/26 4:51, Jaegeuk Kim wrote:
Let's use F2FS_COMPRESS_RELEASED to disallow writes only.
Signed-off-by: Jaegeuk Kim
Reviewed-by: Chao Yu
Too late, as I published it in master.
Oops, sorry for the delay.
So does the p
On 2021/6/8 0:47, Jaegeuk Kim wrote:
On 06/07, Chao Yu wrote:
On 2021/6/5 7:51, Jaegeuk Kim wrote:
On 06/04, Chao Yu wrote:
On 2021/5/27 10:12, Chao Yu wrote:
On 2021/5/27 9:40, Jaegeuk Kim wrote:
On 05/26, Chao Yu wrote:
On 2021/5/26 21:30, Jaegeuk Kim wrote:
On 05/26, Chao Yu wrote:
Aft
On 06/07, Chao Yu wrote:
> On 2021/6/6 13:36, Jaegeuk Kim wrote:
> > Let's create /sys/fs/f2fs//feature_list/ to meet sysfs rule.
> >
> > Note that there are three feature list entries:
> > 1) /sys/fs/f2fs/features
> >: shows runtime features supported by in-kernel f2fs along with Kconfig.
> >
On 06/06, Chao Yu wrote:
> On 2021/5/26 4:49, Jaegeuk Kim wrote:
> > Once we release compressed blocks, we used to set IMMUTABLE bit. But it
> > turned
> > out it disallows every fs operations which we don't need for compression.
> >
> > Let's just prevent writing data only.
> >
> > Signed-off-b
On 06/06, Chao Yu wrote:
> On 2021/5/26 4:51, Jaegeuk Kim wrote:
> > Let's use F2FS_COMPRESS_RELEASED to disallow writes only.
> >
> > Signed-off-by: Jaegeuk Kim
>
> Reviewed-by: Chao Yu
Too late, as I published it in master.
>
> Thanks,
___
Linu
On 06/07, Chao Yu wrote:
> On 2021/6/5 7:51, Jaegeuk Kim wrote:
> > On 06/04, Chao Yu wrote:
> > > On 2021/5/27 10:12, Chao Yu wrote:
> > > > On 2021/5/27 9:40, Jaegeuk Kim wrote:
> > > > > On 05/26, Chao Yu wrote:
> > > > > > On 2021/5/26 21:30, Jaegeuk Kim wrote:
> > > > > > > On 05/26, Chao Yu w
On Mon, Jun 07, 2021 at 04:52:13PM +0200, Jan Kara wrote:
> Currently, serializing operations such as page fault, read, or readahead
> against hole punching is rather difficult. The basic race scheme is
> like:
>
> fallocate(FALLOC_FL_PUNCH_HOLE) read / fault / ..
> truncat
On Mon, Jun 07, 2021 at 04:52:19PM +0200, Jan Kara wrote:
> Convert places in XFS that take MMAPLOCK for two inodes to use helper
> VFS provides for it (filemap_invalidate_down_write_two()). Note that
> this changes lock ordering for MMAPLOCK from inode number based ordering
> to pointer based orde
On Mon, Jun 07, 2021 at 04:52:18PM +0200, Jan Kara wrote:
> Use invalidate_lock instead of XFS internal i_mmap_lock. The intended
> purpose of invalidate_lock is exactly the same. Note that the locking in
> __xfs_filemap_fault() slightly changes as filemap_fault() already takes
> invalidate_lock.
>
On Mon, Jun 07, 2021 at 04:52:17PM +0200, Jan Kara wrote:
> From: Pavel Reichl
>
> Refactor xfs_isilocked() to use newly introduced __xfs_rwsem_islocked().
> __xfs_rwsem_islocked() is a helper function which encapsulates checking
> state of rw_semaphores hold by inode.
>
> Signed-off-by: Pavel R
On Mon, Jun 07, 2021 at 04:52:14PM +0200, Jan Kara wrote:
> Some operations such as reflinking blocks among files will need to lock
> invalidate_lock for two mappings. Add helper functions to do that.
>
> Signed-off-by: Jan Kara
Straightforward lift from xfs, though now with vfs lock ordering
ru
On Mon, Jun 07, 2021 at 04:52:11PM +0200, Jan Kara wrote:
> inode->i_mutex has been replaced with inode->i_rwsem long ago. Fix
> comments still mentioning i_mutex.
>
> Reviewed-by: Christoph Hellwig
> Acked-by: Hugh Dickins
> Signed-off-by: Jan Kara
Looks good to me,
Reviewed-by: Darrick J. Wo
On 2021/6/5 7:51, Jaegeuk Kim wrote:
On 06/04, Chao Yu wrote:
On 2021/5/27 10:12, Chao Yu wrote:
On 2021/5/27 9:40, Jaegeuk Kim wrote:
On 05/26, Chao Yu wrote:
On 2021/5/26 21:30, Jaegeuk Kim wrote:
On 05/26, Chao Yu wrote:
After commit af4b6b8edf6a ("f2fs: introduce check_swap_activate_fas
Currently, serializing operations such as page fault, read, or readahead
against hole punching is rather difficult. The basic race scheme is
like:
fallocate(FALLOC_FL_PUNCH_HOLE) read / fault / ..
truncate_inode_pages_range()
From: Pavel Reichl
Refactor xfs_isilocked() to use newly introduced __xfs_rwsem_islocked().
__xfs_rwsem_islocked() is a helper function which encapsulates checking
state of rw_semaphores hold by inode.
Signed-off-by: Pavel Reichl
Suggested-by: Dave Chinner
Suggested-by: Eric Sandeen
Suggested
Cifs has a following race between hole punching and page fault:
CPU1CPU2
smb3_fallocate()
smb3_punch_hole()
truncate_pagecache_range()
filemap_fault()
Use invalidate_lock instead of fuse's private i_mmap_sem. The intended
purpose is exactly the same. By this conversion we fix a long standing
race between hole punching and read(2) / readahead(2) paths that can
lead to stale page cache contents.
CC: Miklos Szeredi
Signed-off-by: Jan Kara
---
fs
Some operations such as reflinking blocks among files will need to lock
invalidate_lock for two mappings. Add helper functions to do that.
Signed-off-by: Jan Kara
---
include/linux/fs.h | 6 ++
mm/filemap.c | 38 ++
2 files changed, 44 insertions(+)
Hello,
here is another version of my patches to address races between hole punching
and page cache filling functions for ext4 and other filesystems. The biggest
change since the last time is providing function to lock two mappings and using
it from XFS. Other changes were pretty minor.
Out of all
Sync listing of struct file_operations members with the real one in
fs.h.
Acked-by: Darrick J. Wong
Signed-off-by: Jan Kara
---
Documentation/filesystems/locking.rst | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/Documentation/filesystems/locking.rst
b/Docu
Use invalidate_lock instead of f2fs' private i_mmap_sem. The intended
purpose is exactly the same. By this conversion we fix a long standing
race between hole punching and read(2) / readahead(2) paths that can
lead to stale page cache contents.
CC: Jaegeuk Kim
CC: Chao Yu
CC: linux-f2fs-devel@li
Ceph has a following race between hole punching and page fault:
CPU1 CPU2
ceph_fallocate()
...
ceph_zero_pagecache_range()
ceph_filemap_fault()
faults in page in the range being
Convert places in XFS that take MMAPLOCK for two inodes to use helper
VFS provides for it (filemap_invalidate_down_write_two()). Note that
this changes lock ordering for MMAPLOCK from inode number based ordering
to pointer based ordering VFS generally uses.
CC: "Darrick J. Wong"
Reviewed-by: Darr
Use invalidate_lock instead of XFS internal i_mmap_lock. The intended
purpose of invalidate_lock is exactly the same. Note that the locking in
__xfs_filemap_fault() slightly changes as filemap_fault() already takes
invalidate_lock.
Reviewed-by: Christoph Hellwig
CC:
CC: "Darrick J. Wong"
Signed
Convert ext4 to use mapping->invalidate_lock instead of its private
EXT4_I(inode)->i_mmap_sem. This is mostly search-and-replace. By this
conversion we fix a long standing race between hole punching and read(2)
/ readahead(2) paths that can lead to stale page cache contents.
CC:
CC: Ted Tso
Sign
Use invalidate_lock instead of zonefs' private i_mmap_sem. The intended
purpose is exactly the same.
CC: Damien Le Moal
CC: Johannes Thumshirn
CC:
Acked-by: Damien Le Moal
Signed-off-by: Jan Kara
---
fs/zonefs/super.c | 23 +--
fs/zonefs/zonefs.h | 7 +++
2 files ch
Ext2 has its private dax_sem used for synchronizing page faults and
truncation. Use mapping->invalidate_lock instead as it is meant for this
purpose.
CC:
Signed-off-by: Jan Kara
---
fs/ext2/ext2.h | 11 ---
fs/ext2/file.c | 7 +++
fs/ext2/inode.c | 12 ++--
fs/ext2/super.
inode->i_mutex has been replaced with inode->i_rwsem long ago. Fix
comments still mentioning i_mutex.
Reviewed-by: Christoph Hellwig
Acked-by: Hugh Dickins
Signed-off-by: Jan Kara
---
mm/filemap.c| 10 +-
mm/madvise.c| 2 +-
mm/memory-failure.c | 2 +-
mm/rmap.c
On 2021/6/6 13:36, Jaegeuk Kim wrote:
Let's create /sys/fs/f2fs//feature_list/ to meet sysfs rule.
Note that there are three feature list entries:
1) /sys/fs/f2fs/features
: shows runtime features supported by in-kernel f2fs along with Kconfig.
- ref. F2FS_FEATURE_RO_ATTR()
2) /sys/fs/f
On 2021/6/5 8:32, Jaegeuk Kim wrote:
This patch adds missing pin_file feature supported by kernel.
Fixes: f5a53edcf01e ("f2fs: support aligned pinned file")
Signed-off-by: Jaegeuk Kim
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing lis
37 matches
Mail list logo