linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: michael.arndt@berlin.de
Cc: linux-xfs@vger.kernel.org
Subject: Re: xfs fstrim and quota
Date: Tue, 24 Apr 2018 07:35:17 -0400	[thread overview]
Message-ID: <20180424113517.GC49785@bfoster.bfoster> (raw)
In-Reply-To: <483b7b2c592450221bb5567e64bad84e@berlin.de>

On Tue, Apr 24, 2018 at 10:28:34AM +0200, michael.arndt@berlin.de wrote:
> Hello *
> 
> Will fstrim operations for a thin provisioning storage and xfs quota
> conflict with each other ?
> 

How so? fstrim should basically inform the underlying device of blocks
in the filesystem that are free. Free blocks in the fs aren't accounted
to any quota by definition, so there shouldn't be a conflict.

> If i understand fstrim code correctly, in case of xfs / thin provisioning
> storage it tells xfs to release unused blocks.
> 

Right... so an underlying thin block device can release blocks that are
unused in the fs.

> I have read indications that blocks are marked to the underlying storage as
> freed by zeroing them out.
> 
> Is the "write zeros" correct information, or will be commands like scsi
> unmap or FITRIM be sent to the storage ?
> 

The fs invokes the block layer discard mechanism. I can't really speak
to how this translates into device commands. My understanding is that a
dm-thin device would/could act on this to release associated blocks to
the pool, otherwise the behavior may depend on the physical
characteristics of the underlying device (i.e., SSD, non-dm thin
devices, etc.), supported commands or whatnot. Perhaps somebody else can
chime in on that or otherwise this might be a better question for the
block layer folks.

Brian

> I found many exact references to fstrim on SSD, but no technical description
> on which operation is implemented for thin provisioning storages.
> 
> TIA
> Micha
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2018-04-24 11:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <c3cbf69c52f0e89631c796016449bbe3@berlin.de>
2018-04-24  8:28 ` xfs fstrim and quota michael.arndt
2018-04-24 11:35   ` Brian Foster [this message]
2018-11-14 10:51     ` xfs remove / unlink extremely slow ? Michael Arndt
2018-04-24 16:10   ` xfs fstrim and quota Eric Sandeen

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=20180424113517.GC49785@bfoster.bfoster \
    --to=bfoster@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=michael.arndt@berlin.de \
    /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).