Re: [f2fs-dev] [PATCH 1/2 v2] f2fs: update mtime and ctime in move file range method
On 2023/6/26 0:06, Yunlei He wrote: Mtime and ctime stay old value without update after move file range ioctl. This patch add time update. Signed-off-by: Yunlei He Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH 1/2 v2] f2fs: update mtime and ctime in move file range method
On 06/23, Yunlei He wrote: > Mtime and ctime stay old value without update after move > file range ioctl. This patch add time update. > > Signed-off-by: Yunlei He > --- > v2: > -update both src and dst inode > fs/f2fs/file.c | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c > index cb42d8464ad9..e59fc8faa035 100644 > --- a/fs/f2fs/file.c > +++ b/fs/f2fs/file.c > @@ -2886,6 +2886,19 @@ static int f2fs_move_file_range(struct file *file_in, > loff_t pos_in, > f2fs_up_write(_I(dst)->i_gc_rwsem[WRITE]); > out_src: > f2fs_up_write(_I(src)->i_gc_rwsem[WRITE]); > + > + if (!ret) { Applied with minor change like: if (ret) goto out_unlock; ... > + src->i_mtime = src->i_ctime = current_time(src); > + f2fs_mark_inode_dirty_sync(src, false); > + > + if (src != dst) { > + dst->i_mtime = dst->i_ctime = current_time(dst); > + f2fs_mark_inode_dirty_sync(dst, false); > + } > + > + f2fs_update_time(sbi, REQ_TIME); > + } > + > out_unlock: > if (src != dst) > inode_unlock(dst); > -- > 2.40.1 ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH 1/2 v2] f2fs: update mtime and ctime in move file range method
On 2023/6/23 0:16, Yunlei He wrote: Mtime and ctime stay old value without update after move file range ioctl. This patch add time update. Signed-off-by: Yunlei He Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH 1/2 v2] f2fs: update mtime and ctime in move file range method
On 2023/6/21 21:39, Chao Yu wrote: On 2023/6/21 17:43, Yunlei He wrote: Mtime and ctime stay old value without update after move file range ioctl. This patch add time update. Signed-off-by: Yunlei He --- v2: -update both src and dst inode fs/f2fs/file.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index cb42d8464ad9..4adcf62e2665 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -2884,8 +2884,22 @@ static int f2fs_move_file_range(struct file *file_in, loff_t pos_in, if (src != dst) f2fs_up_write(_I(dst)->i_gc_rwsem[WRITE]); + Unneeded blank line. out_src: f2fs_up_write(_I(src)->i_gc_rwsem[WRITE]); + + if (!ret) { + src->i_mtime = src->i_ctime = current_time(src); + f2fs_mark_inode_dirty_sync(src, false); + + if (src != dst) { + dst->i_mtime = dst->i_ctime = current_time(dst); + f2fs_mark_inode_dirty_sync(dst, false); + } + + f2fs_update_time(F2FS_I_SB(src), REQ_TIME); f2fs_update_time(sbi, REQ_TIME); Hi Chao, Thanks for your review, I have resend this patch set. Thanks, Thanks, + } + out_unlock: if (src != dst) inode_unlock(dst); ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH 1/2 v2] f2fs: update mtime and ctime in move file range method
On 2023/6/21 17:43, Yunlei He wrote: Mtime and ctime stay old value without update after move file range ioctl. This patch add time update. Signed-off-by: Yunlei He --- v2: -update both src and dst inode fs/f2fs/file.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index cb42d8464ad9..4adcf62e2665 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -2884,8 +2884,22 @@ static int f2fs_move_file_range(struct file *file_in, loff_t pos_in, if (src != dst) f2fs_up_write(_I(dst)->i_gc_rwsem[WRITE]); + Unneeded blank line. out_src: f2fs_up_write(_I(src)->i_gc_rwsem[WRITE]); + + if (!ret) { + src->i_mtime = src->i_ctime = current_time(src); + f2fs_mark_inode_dirty_sync(src, false); + + if (src != dst) { + dst->i_mtime = dst->i_ctime = current_time(dst); + f2fs_mark_inode_dirty_sync(dst, false); + } + + f2fs_update_time(F2FS_I_SB(src), REQ_TIME); f2fs_update_time(sbi, REQ_TIME); Thanks, + } + out_unlock: if (src != dst) inode_unlock(dst); ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel