Re: [PATCH 8/8] ovl: Fix ovl_getattr() to get number of blocks from lower

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 06, 2017 at 10:09:38PM +0300, Amir Goldstein wrote:

[..]
> >> > @@ -140,6 +143,17 @@ int ovl_getattr(const struct path *path, struct kstat *stat,
> >> >         if (!is_dir && ovl_test_flag(OVL_INDEX, d_inode(dentry)))
> >> >                 stat->nlink = dentry->d_inode->i_nlink;
> >> >
> >> > +       if (ovl_test_flag(OVL_METACOPY, d_inode(dentry))) {
> >> > +               u32 lowermask = STATX_BLOCKS;
> >> > +
> >> > +               if (!lowerstat_done) {
> >>
> >> I guess lowerstat_done is as result from my comment,
> >> but I did not mean I think vfs_getattr() is expensive,
> >> I just didn't like the duplication of that code block, but maybe
> >> just a matter of personal taste.
> >> Can be sorted out later.
> >
> > Yes, I added this because I thought you wanted to avoid that extra
> > vfs_getattr() call. I am open to change it whatever way you like.
> > Personally I did not like this extra boolean and I liked unconditional
> > vfs_getattr() better. It was not most optimized but was easier to
> > understand.
> >
> 
> Yeh, I liked it without the boolean better as well.
> What I meant is once this patch lands:
> https://github.com/chandanr/linux/commit/e9024b0a08a1c725daed548f68ff703305c40124
> vfs_getattr() will be called for all non-dir with ORIGIN anyway, so
> METACOPY will be able to piggy back STATX_BLOCKS flag on the same call.

Aha, got it. Once these patches are merged, I will rebase my patch on top
of it. 

In the mean time, for the purpose of review and test, I will continue with my
patch.

Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux