lkml.org 
[lkml]   [2020]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [f2fs-dev] [PATCH] f2fs: fix quota_sync failure due to f2fs_lock_op
    From
    Date
    On 2020/4/10 1:30, Jaegeuk Kim wrote:
    > f2fs_quota_sync() uses f2fs_lock_op() before flushing dirty pages, but
    > f2fs_write_data_page() returns EAGAIN.
    > Likewise dentry blocks, we can just bypass getting the lock, since quota
    > blocks are also maintained by checkpoint.
    >
    > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
    > ---
    > fs/f2fs/data.c | 4 ++--
    > 1 file changed, 2 insertions(+), 2 deletions(-)
    >
    > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
    > index 358c5f0bd6346..1139d8cf4b8d1 100644
    > --- a/fs/f2fs/data.c
    > +++ b/fs/f2fs/data.c
    > @@ -2707,8 +2707,8 @@ int f2fs_write_single_data_page(struct page *page, int *submitted,
    > f2fs_available_free_memory(sbi, BASE_CHECK))))
    > goto redirty_out;
    >
    > - /* Dentry blocks are controlled by checkpoint */
    > - if (S_ISDIR(inode->i_mode)) {
    > + /* Dentry/quota blocks are controlled by checkpoint */
    > + if (S_ISDIR(inode->i_mode) || IS_NOQUOTA(inode)) {

    Should cover multipage write path, in the case of normal quota file
    (such as /quota.user or /quota.group) is set as compressed.

    Thanks,

    > fio.need_lock = LOCK_DONE;
    > err = f2fs_do_write_data_page(&fio);
    > goto done;
    >

    \
     
     \ /
      Last update: 2020-04-16 09:18    [W:2.429 / U:0.356 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site