From: Dave Chinner <david@fromorbit.com>
To: wang.yi59@zte.com.cn
Cc: djwong@kernel.org, linux-xfs@vger.kernel.org,
linux-kernel@vger.kernel.org, xue.zhihong@zte.com.cn,
wang.liang82@zte.com.cn, cheng.lin130@zte.com.cn
Subject: Re: [PATCH] xfs: getattr ignore blocks beyond eof
Date: Sat, 2 Apr 2022 09:14:24 +1100 [thread overview]
Message-ID: <20220401221424.GN1544202@dread.disaster.area> (raw)
In-Reply-To: <202204011609406223339@zte.com.cn>
On Fri, Apr 01, 2022 at 04:09:40PM +0800, wang.yi59@zte.com.cn wrote:
> > On Thu, Mar 31, 2022 at 04:32:07PM +0800, wang.yi59@zte.com.cn wrote:
> > > > We do not, and have not ever tried to, hide allocation or block
> > > > usage artifacts from userspace because any application that depends
> > > > on specific block allocation patterns or accounting from the
> > > > filesystem is broken by design.
> > > >
> > > > If your application is dependent on block counts exactly matching
> > > > the file data space for waht ever reason, then what speculative
> > > > preallocation does is the least of your problems.
> > > >
> > >
> > > Thanks for your explaination.
> > >
> > > Unfortunately, the app I'm using evaluates diskusage by querying
> > > the changes of the backend filesystem (XFS) file before and after
> > > the operation.
> >
> > What application is this?
> >
> > What is it trying to use this information for?
>
> Thanks very much, Dave.
>
> I'm trying to use a new xlater(module) named 'simple-quota' in
> glusterfs, which collects file's diskusage by stat, for quota function.
So a company (kadalu) has forked gluster, then removed the gluster
quota implementation because of undefined "major performance
problems" and then implemented their own quota thing that stores
disk usage information in extended attributes. And:
Advised method is adding quota limit info before writing any
information to directory. Even otherwise we don’t need quota
crawl for updating quota-limit, but do a du -s -b $dir and
write the output into xattr.
Yeah, that's broken by design.
Oh, look at that:
Just run statfs() on all dirs which has Quota set, and send
a flag to update status of quota xlator through internal
xattr mechanism if quota limit exceeds for a directory! This
can run once in 5 or 10 seconds, or even lesser frequency if
the quota limit is huge!
That's pretty broken, too. Doesn't scale out, either...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2022-04-01 22:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-31 8:02 [PATCH] xfs: getattr ignore blocks beyond eof Yi Wang
2022-03-31 0:38 ` Darrick J. Wong
2022-03-31 3:28 ` wang.yi59
2022-03-31 5:33 ` [PATCH] " Dave Chinner
2022-03-31 5:48 ` Dave Chinner
2022-03-31 8:32 ` wang.yi59
2022-03-31 21:21 ` [PATCH] " Dave Chinner
2022-04-01 8:09 ` wang.yi59
2022-04-01 22:14 ` Dave Chinner [this message]
2022-03-31 2:57 ` [PATCH] " kernel test robot
2022-03-31 3:07 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220401221424.GN1544202@dread.disaster.area \
--to=david@fromorbit.com \
--cc=cheng.lin130@zte.com.cn \
--cc=djwong@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=wang.liang82@zte.com.cn \
--cc=wang.yi59@zte.com.cn \
--cc=xue.zhihong@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).