linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Brian Foster <bfoster@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [RFC PATCH 0/14] xfs: Towards thin provisioning aware filesystems
Date: Thu, 2 Nov 2017 10:53:00 +1100	[thread overview]
Message-ID: <20171101235300.GT5858@dastard> (raw)
In-Reply-To: <20171101141720.GB11709@bfoster.bfoster>

On Wed, Nov 01, 2017 at 10:17:21AM -0400, Brian Foster wrote:
> On Wed, Nov 01, 2017 at 11:45:13AM +1100, Dave Chinner wrote:
> > On Tue, Oct 31, 2017 at 07:24:32AM -0400, Brian Foster wrote:
> > > On Tue, Oct 31, 2017 at 08:09:41AM +1100, Dave Chinner wrote:
> > > > On Mon, Oct 30, 2017 at 09:31:17AM -0400, Brian Foster wrote:
> > > > > On Thu, Oct 26, 2017 at 07:33:08PM +1100, Dave Chinner wrote:
> > > > > > This patchset is aimed at filesystems that are installed on sparse
> > > > > > block devices, a.k.a thin provisioned devices. The aim of the
> > > > > > patchset is to bring the space management aspect of the storage
> > > > > > stack up into the filesystem rather than keeping it below the
> > > > > > filesystem where users and the filesystem have no clue they are
> > > > > > about to run out of space.
> > ....
> > > > I get that "total_blocks" sounds better, but to me that's a capacity
> > > > measurement, not an indication of the size of the underlying address
> > > > space the block device has provided. m_usable_blocks is obviously a
> > > > capacity measurement, but I was trying to convey that m_LBA_size is
> > > > not a capacity measurement but an externally imposed addressing
> > > > limit.
> > > > 
> > > > <shrug>
> > > > 
> > > > I guess if I document it well enough m_total_blocks will work.
> > > > 
> > > 
> > > Hmm, yeah I see what you mean. Unfortunately I can't really think of
> > > anything aside from m_total_blocks or perhaps m_phys_blocks at the
> > > moment.
> > 
> > m_phys_blocks seems closer to the intent. If that's acceptible I'll
> > change the code to that.
> > 
> 
> That works for me, thanks..
> 
> BTW, was there ever any kind of solution to the metadata block
> reservation issue in the thin case? We now hide metadata reservation
> from the user via the m_usable_blocks account. If m_phys_blocks
> represents a thin volume, how exactly do we prevent those metadata
> allocations/writes from overrunning what the admin has specified as
> "usable" with respect to the thin volume?

The reserved metadata blocks are not accounted from free space when
they are allocated - they are pulled from the reserved space that
has already been removed from the free space.

i.e. we can use as much or as little of the reserved space as we
want, but it doesn't affect the free/used space reported to
userspace at all.

> > > > > Finally, I tend to agree with Amir's comment with regard to
> > > > > shrink/growfs... at least infosar as I understand his concern. If we do
> > > > > support physical shrink in the future, what do we expect the interface
> > > > > to look like in light of this change?
> > > > 
> > > > I don't expect it to look any different. It's exactly the same as
> > > > growfs - thinspace filesystem will simply do a logical grow/shrink,
> > > > fat filesystems will need to do a physical grow/shrink
> > > > adding/removing AGs.
> > > > 
> > > 
> > > How would you physically shrink a thin filesystem?
> > 
> > You wouldn't. There should never be a need to do this because it a
> > thinspace shrink doesn't actually free any space - it's just a usage
> > limit. fstrim is what actually shrinks the storage space used,
> > regardless of the current maximum capcity of the thin filesystem.
> 
> In other words, the answer is that we can't physically shrink a thin fs
> because of a limitation on the growfs interface due to how we've used it
> here.

No, that is not the what I said. To paraphrase, what I said was "we
aren't going to support physically shrinking thin filesystems at
this point in time". That has nothing to do with the growfs API -
it's an implementation choice that reflects the fact we can't
physically shrink filesystems and that functionality is no closer to
being implemented than it was 10+ years ago.

i.e. we don't need to rev the interface to support shrink on thin
filesystems, so there's no need to rev the interface at this point
in time.

*If* we implement physical shrink, *then* we can rev the growfs
interface to allow users to run a physical shrink on thin
filesystems.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2017-11-01 23:53 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-26  8:33 [RFC PATCH 0/14] xfs: Towards thin provisioning aware filesystems Dave Chinner
2017-10-26  8:33 ` [PATCH 01/14] xfs: factor out AG header initialisation from growfs core Dave Chinner
2017-10-26  8:33 ` [PATCH 02/14] xfs: convert growfs AG header init to use buffer lists Dave Chinner
2017-10-26  8:33 ` [PATCH 03/14] xfs: factor ag btree reoot block initialisation Dave Chinner
2017-10-26  8:33 ` [PATCH 04/14] xfs: turn ag header initialisation into a table driven operation Dave Chinner
2017-10-26  8:33 ` [PATCH 05/14] xfs: make imaxpct changes in growfs separate Dave Chinner
2017-10-26  8:33 ` [PATCH 06/14] xfs: separate secondary sb update in growfs Dave Chinner
2017-10-26  8:33 ` [PATCH 07/14] xfs: rework secondary superblock updates " Dave Chinner
2017-10-26  8:33 ` [PATCH 08/14] xfs: move various type verifiers to common file Dave Chinner
2017-10-26  8:33 ` [PATCH 09/14] xfs: split usable space from block device size Dave Chinner
2017-10-26  8:33 ` [PATCH 10/14] xfs: hide reserved metadata space from users Dave Chinner
2017-10-26  8:33 ` [PATCH 11/14] xfs: bump XFS_IOC_FSGEOMETRY to v5 structures Dave Chinner
2017-10-26  8:33 ` [PATCH 12/14] xfs: convert remaingin xfs_sb_version_... checks to bool Dave Chinner
2017-10-26 16:03   ` Darrick J. Wong
2017-10-26  8:33 ` [PATCH 13/14] xfs: add suport for "thin space" filesystems Dave Chinner
2017-10-26  8:33 ` [PATCH 14/14] xfs: add growfs support for changing usable blocks Dave Chinner
2017-10-26 11:30   ` Amir Goldstein
2017-10-26 12:48     ` Dave Chinner
2017-10-26 13:32       ` Amir Goldstein
2017-10-27 10:26         ` Amir Goldstein
2017-10-26 11:09 ` [RFC PATCH 0/14] xfs: Towards thin provisioning aware filesystems Amir Goldstein
2017-10-26 12:35   ` Dave Chinner
2017-11-01 22:31     ` Darrick J. Wong
2017-10-30 13:31 ` Brian Foster
2017-10-30 21:09   ` Dave Chinner
2017-10-31  4:49     ` Amir Goldstein
2017-10-31 22:40       ` Dave Chinner
2017-10-31 11:24     ` Brian Foster
2017-11-01  0:45       ` Dave Chinner
2017-11-01 14:17         ` Brian Foster
2017-11-01 23:53           ` Dave Chinner [this message]
2017-11-02 11:25             ` Brian Foster
2017-11-02 23:30               ` Dave Chinner
2017-11-03  2:47                 ` Darrick J. Wong
2017-11-03 11:36                   ` Brian Foster
2017-11-05 22:50                     ` Dave Chinner
2017-11-06 13:01                       ` Brian Foster
2017-11-06 21:20                         ` Dave Chinner
2017-11-07 11:28                           ` Brian Foster
2017-11-03 11:26                 ` Brian Foster
2017-11-03 12:19                   ` Amir Goldstein
2017-11-06  1:16                     ` Dave Chinner
2017-11-06  9:48                       ` Amir Goldstein
2017-11-06 21:46                         ` Dave Chinner
2017-11-07  5:30                           ` Amir Goldstein
2017-11-05 23:51                   ` Dave Chinner
2017-11-06 13:07                     ` Brian Foster

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=20171101235300.GT5858@dastard \
    --to=david@fromorbit.com \
    --cc=bfoster@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    /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).