linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Ilya Pronin <ipronin@twitter.com>
Cc: linux-xfs@vger.kernel.org, Carlos Maiolino <cmaiolino@redhat.com>
Subject: Re: Reading/changing projid of a symlink
Date: Thu, 14 Jun 2018 12:31:32 +1000	[thread overview]
Message-ID: <20180614023132.GI10363@dastard> (raw)
In-Reply-To: <CA+Xn3kyxiOj+irNiqKWQWfJ_aUv1RYFsH+UCnv3gnMuYJ=oUQw@mail.gmail.com>

On Tue, Jun 12, 2018 at 03:17:27PM -0700, Ilya Pronin wrote:
> So the only way to remove a symlink from a project is to remove it?
> 
> Here's my use case. In Apache Mesos we use XFS project quotas for disk
> space isolation. Every container sandbox is allocated its own project
> ID. When the container terminates its project ID is unset from the
> sandbox and files inside it, and can be used for other containers.
> Sandboxes of terminated containers stay on the host for some time for
> debugging, etc. With such approach the inability to remove projid from
> symlinks presents a small problem: when a project ID is reused for a
> new container, any lingering symlinks that still have that project ID
> will contribute to disk usage of the new container. Typically not
> much, but still that's inaccurate. I guess we'll need to change when
> we "deallocate" projids.

XFS has a 32bit project ID space, so you really don't need to reuse
project IDs at all. Just keep incrementing the new container ID, and
maybe after a couple of billion project IDs have been consumed you
can look at reclaiming/recycling/resetting the new ID counter?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

      parent reply	other threads:[~2018-06-14  2:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31  0:26 Reading/changing projid of a symlink Ilya Pronin
2018-06-12 14:36 ` Carlos Maiolino
2018-06-12 22:17   ` Ilya Pronin
2018-06-13  6:23     ` Christoph Hellwig
2018-06-13 14:22       ` Eric Sandeen
2018-06-13  9:40     ` Carlos Maiolino
2018-06-15  0:14       ` Ilya Pronin
2018-06-15  7:08         ` Carlos Maiolino
2018-06-15  7:12           ` Christoph Hellwig
2018-06-15  8:57             ` Carlos Maiolino
2018-06-15  9:00               ` Christoph Hellwig
2018-06-14  2:31     ` Dave Chinner [this message]

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=20180614023132.GI10363@dastard \
    --to=david@fromorbit.com \
    --cc=cmaiolino@redhat.com \
    --cc=ipronin@twitter.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).