lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171019191229.GC82186@jaegeuk-macbookpro.roam.corp.google.com>
Date:   Thu, 19 Oct 2017 12:12:29 -0700
From:   Jaegeuk Kim <jaegeuk@...nel.org>
To:     Chao Yu <yuchao0@...wei.com>
Cc:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [PATCH] f2fs: expose some sectors to user in inline data or
 dentry case

On 10/18, Chao Yu wrote:
> On 2017/10/18 6:03, Jaegeuk Kim wrote:
> > On 10/16, Chao Yu wrote:
> >> On 2017/10/14 1:31, Jaegeuk Kim wrote:
> >>> If there's some data written through inline data or dentry, we need to shouw
> >>> st_blocks. This fixes reporting zero blocks even though there is small written
> >>> data.
> >>>
> >>> Signed-off-by: Jaegeuk Kim <jaegeuk@...nel.org>
> >>
> >> Reviewed-by: Chao Yu <yuchao0@...wei.com>
> >>
> >> Thanks,
> >>
> >>> ---
> >>>  fs/f2fs/file.c | 5 +++++
> >>>  1 file changed, 5 insertions(+)
> >>>
> >>> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> >>> index 2eb3efe92018..f7be6c394fa8 100644
> >>> --- a/fs/f2fs/file.c
> >>> +++ b/fs/f2fs/file.c
> >>> @@ -698,6 +698,11 @@ int f2fs_getattr(const struct path *path, struct kstat *stat,
> >>>  				  STATX_ATTR_NODUMP);
> >>>  
> >>>  	generic_fillattr(inode, stat);
> >>> +
> >>> +	/* we need to show initial sectors used for inline_data/dentries */
> >>> +	if (f2fs_has_inline_data(inode) || f2fs_has_inline_dentry(inode))
> > 
> > FYI;
> > I added S_ISREG(inode->i_mode) with f2fs_has_inline_data() to avoid quotacheck
> > error.
> 
> If this patch is related to quotacheck issue, I doubt that there will be
> problemetic, in no journalled quota case, fs quota system won't stat blocks
> in inline file, however, after SPO, when using quotacheck to scan file to
> recover quota info, blocks of inline file showed in getattr can be stated
> into quota. That would be inconsistent.

FWIW, quotacheck counts i_blocks via ioctl for normal files. Without this
modification, xfstests gives an failure on quota cases.

> 
> Thanks,
> 
> > 
> >>> +		stat->blocks += (stat->size + 511) >> 9;
> >>> +
> >>>  	return 0;
> >>>  }
> >>>  
> >>>
> > 
> > .
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ