From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Wang Shilong <wshilong@ddn.com>
Cc: Wang Shilong <wangshilong1991@gmail.com>,
"linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>
Subject: Re: 回复: [PATCH] xfs,fstrim: fix to return correct minlen
Date: Thu, 11 Apr 2019 17:21:52 -0700 [thread overview]
Message-ID: <20190412002152.GH1019523@magnolia> (raw)
In-Reply-To: <BYAPR19MB27582F4FC44A885242364A78D42F0@BYAPR19MB2758.namprd19.prod.outlook.com>
On Thu, Apr 11, 2019 at 02:05:08AM +0000, Wang Shilong wrote:
> Hi Darrick,
>
>
> On Wed, Apr 10, 2019 at 05:42:28PM +0900, Wang Shilong wrote:
> > From: Wang Shilong <wshilong@ddn.com>
> >
> > This patch tries to address two problems:
> >
> > 1) return @minlen we used to trim to
> > user space.
> >
> > 2) return EINVAL if granularity is larger than
> > avg size, even most of cases, granularity is small(4K),
> > but if devices return a lager granularity for some reaons
> > (testing, bugs etc), fstrim should return failure directly.
>
> It really is a pity^W^Wannoying that there's no manual page for FITRIM,
> because I have no idea if this is the right or desired behavior for this
> ioctl.
>
> Do the other filesystems update @minlen so that userspace knows the
> granularity?
>
> --D
>
> --------->
> As far as I checked ext4, f2fs, Btrfs did so,
Fair enough.
> I think it makes sense we return this value to userspace, we'd better
> to doc it somewhere 'man fstrim'?
Ok, please cc me when you send the documentation update.
--D
> thanks,
> Shilong
next prev parent reply other threads:[~2019-04-12 0:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-10 8:42 [PATCH] xfs,fstrim: fix to return correct minlen Wang Shilong
2019-04-11 1:54 ` Darrick J. Wong
2019-04-11 2:05 ` 回复: " Wang Shilong
2019-04-12 0:21 ` Darrick J. Wong [this message]
2019-04-16 0:11 ` Darrick J. Wong
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=20190412002152.GH1019523@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=wangshilong1991@gmail.com \
--cc=wshilong@ddn.com \
/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).