We should set noatime bit for quota files, since no one cares about
atime of quota file, and we should set immutalbe bit as well, due to
nobody should write to the file through exported interfaces.
Meanwhile this patch use inode_lock to avoid race condition during
inode->i_flags, f2fs_inode->i_fla
On Wed, May 24, 2023 at 09:00:36AM +0200, Miklos Szeredi wrote:
> > +ssize_t direct_write_fallback(struct kiocb *iocb, struct iov_iter *iter,
> > + ssize_t direct_written, ssize_t buffered_written)
> > +{
> > + struct address_space *mapping = iocb->ki_filp->f_mapping;
> > +
On Wed, May 24, 2023 at 09:07:22AM +0200, Miklos Szeredi wrote:
> > - endbyte = pos + written_buffered - 1;
> > + endbyte = iocb->ki_pos + written_buffered - 1;
>
> Wrong endpos.
>
> >
> > - err = filemap_write_and_wait_range(file->f_mapping, pos,
> > +
When a directory is moved to a different directory, some filesystems
(udf, ext4, ocfs2, f2fs, and likely gfs2, reiserfs, and others) need to
update their pointer to the parent and this must not race with other
operations on the directory. Lock the directories when they are moved.
Although not all f
Remove locking of moved directory in ext4_rename2(). We will take care
of it in VFS instead. This effectively reverts commit 0813299c586b
("ext4: Fix possible corruption when moving a directory") and followup
fixes.
CC: Ted Tso
CC: sta...@vger.kernel.org
Signed-off-by: Jan Kara
---
fs/ext4/name
This reverts commit d94772154e524b329a168678836745d2773a6e02. The
locking is going to be provided by VFS.
CC: Jaegeuk Kim
CC: sta...@vger.kernel.org
Signed-off-by: Jan Kara
---
fs/f2fs/namei.c | 16 +---
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/fs/f2fs/namei.c b
This reverts commit f950fd0529130a617b3da526da9fb6a896ce87c2. The
locking is going to be provided by vfs_rename() in the following
patches.
CC: sta...@vger.kernel.org
Signed-off-by: Jan Kara
---
fs/udf/namei.c | 14 ++
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/fs
Currently the locking order of inode locks for directories that are not
in ancestor relationship is not defined because all operations that
needed to lock two directories like this were serialized by
sb->s_vfs_rename_mutex. However some filesystems need to lock two
subdirectories for RENAME_EXCHANG
Currently lock_two_nondirectories() is skipping any passed directories.
After vfs_rename() uses lock_two_inodes(), all the remaining four users
of this function pass only regular files to it. So drop the somewhat
unusual "skip directory" logic and instead warn if anybody passes
directory to it. Thi
Hello,
this patch set fixes a problem with cross directory renames originally reported
in [1]. To quickly sum it up some filesystems (so far we know at least about
ext4, udf, f2fs, ocfs2, likely also reiserfs, gfs2 and others) need to lock the
directory when it is being renamed into another direct
On Wed, May 24, 2023 at 8:54 AM Christoph Hellwig wrote:
> All callers of iomap_file_buffered_write need to updated ki_pos, move it
> into common code.
Thanks for this set of cleanups, especially for the patch killing
current->backing_dev_info.
Reviewed-by: Andreas Gruenbacher
> Signed-off-by:
On 05/24, Chunhai Guo wrote:
> find_fsync_inode() detect the looped node chain by comparing the loop
> counter with free blocks. While it may take tens of seconds to quit when
> the free blocks are large enough. We can use Floyd's cycle detection
> algorithm to make the detection more efficient, an
During formatting device, node/data block and filesystem metatdata related
to same inode were updated in separated functions, e.g. for root inode:
- f2fs_write_root_inode() updates root inode's block
- f2fs_write_check_point_pack updates its nat/sit journal, summary block
Result in:
- there are so
On 2023/5/24 9:40, Jaegeuk Kim wrote:
On 05/18, Chao Yu wrote:
On 2023/5/18 9:36, Jaegeuk Kim wrote:
On 05/17, Chao Yu wrote:
Introduce alloc_next_free_block() to wrap below openned codes:
blkaddr = get_sb(main_blkaddr) +
c.cur_seg[curseg_type] * c.blks_per_seg
On 2023/5/24 16:33, Chunhai Guo wrote:
find_fsync_dnodes() detect the looped node chain by comparing the loop
counter with free blocks. While it may take tens of seconds to quit when
the free blocks are large enough. We can use Floyd's cycle detection
algorithm to make the detection more efficien
Fix below incorrect use:
- compare cpu and le32 type variable:
if (get_sb(feature) & cpu_to_le32(F2FS_FEATURE_RO))
- compare le32 type vairable:
if (c.feature & cpu_to_le32(F2FS_FEATURE_EXTRA_ATTR))
- miss get_sb(feature)
(cpu_to_le32(F2FS_FEATURE_RO) ? 1 : 0)
- update le32 type variable
sb->featur
Signed-off-by: Chao Yu
---
fsck/mount.c | 56 +--
include/f2fs_fs.h | 42 +--
2 files changed, 41 insertions(+), 57 deletions(-)
diff --git a/fsck/mount.c b/fsck/mount.c
index 70e8b46..60ad493 100644
--- a/fsck/moun
reuse feature_table in print_sb_state() for cleanup.
Signed-off-by: Chao Yu
---
v2:
- add commit message.
fsck/mount.c | 56 +--
include/f2fs_fs.h | 42 +--
2 files changed, 41 insertions(+), 57 deletions(-)
diff -
18 matches
Mail list logo