All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
To: lustre-devel@lists.lustre.org
Subject: [Lustre-devel] Moving forward on Quotas
Date: Sat, 31 May 2008 18:19:04 +0100	[thread overview]
Message-ID: <1212254344.21348.116.camel@localhost> (raw)
In-Reply-To: <18497.31373.726995.583695@gargle.gargle.HOWL>

On S?b, 2008-05-31 at 20:19 +0400, Nikita Danilov wrote:

> I meant a counter of bytes or blocks that this object occupies for the
> quota purposes. I specifically don't want to identify `space usage' with
> st_blocks, because for the modern file systems there is no _the_ way to
> define what to include into quota: users want quota to be consistent
> with both df(1) and du(1) and in the presence of features like snapshots
> this is not generally possible.


I think dnode_phys_t->dn_used can be used for this, because AFAICS it
keeps track of allocated space referenced by the active filesystem (in
other words, it does not include space which is referenced only by
snapshots).

I am assuming snapshots should not have any effect on quotas, right?


>  > group N+1 may already be quiescing. This presents a challenge because if
>  > the machines crashes, you may lose data in 2 transaction groups, not
>  > just 1, which I think would make things harder to recover..
> 
> Won't it be enough to record in the pending list object from two last
> transaction groups, if necessary?


Hmm.. I think so, but I think we should not rely on this always being 2,
I think we should allow the list to have an unbounded size, and let the
commit callbacks notify when an entry can be pruned from the list.


> But we don't have to, if we make ->space_usage() idempotent, i.e.,
> taking an absolute space usage as a last argument, rather than delta. In
> that case, DMU is free to call it multiple times, and client has to cope
> with this. (Hmm... I am pretty sure this is what I was thinking about
> when composing previous message, but confusing signed __s64 delta
> somehow got in, sorry.)


Ok, that clears my previous concern.
But in this case, how do you know how much you need to add or subtract
to a quota when an object changes size?
I am guessing that you'd need to at least write the previous object size
as part of the pending list, so that when you're recovering you'd know
the delta..

Heh, to me this whole thing sounds quite complicated to get right, but I
think it could work (but of course, fine-grained hard quotas is another
matter altogether..)..


>  > And furthermore, I think this kind of recovery could be better
>  > implemented using commit callbacks, which is an abstraction already
>  > designed for recovery purposes and which is backend-agnostic.
> 
> Sounds interesting, can you elaborate on this?


I was thinking that commit callbacks could be used by the DMU consumer
to solve this problem instead of having an internal DMU list/log, and I
guess you've already figured out how that could be done :)

Cheers,
Ricardo
--

Ricardo Manuel Correia
Lustre Engineering

Sun Microsystems, Inc.
Portugal
Phone +351.214134023 / x58723
Mobile +351.912590825
Email Ricardo.M.Correia at Sun.COM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20080531/18819888/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6g_top.gif
Type: image/gif
Size: 1257 bytes
Desc: not available
URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20080531/18819888/attachment.gif>

  reply	other threads:[~2008-05-31 17:19 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <18490.63940.619731.992500@gargle.gargle.HOWL>
2008-05-26 23:28 ` [Lustre-devel] Moving forward on Quotas Peter Braam
2008-05-28  8:06   ` Johann Lombardi
2008-06-01  2:32     ` Peter Braam
2008-06-02 12:22       ` Johann Lombardi
2008-06-02 23:24       ` Andreas Dilger
2008-06-03  8:49         ` Landen tian
2008-06-04  1:24           ` Peter Braam
2008-06-04  7:05             ` Landen tian
2008-06-04  8:26         ` Johann Lombardi
2008-05-28 14:29   ` Ricardo M. Correia
2008-05-28 14:54     ` Nikita Danilov
2008-05-28 15:14       ` Ricardo M. Correia
2008-05-28 16:22         ` Nikita Danilov
2008-05-28 17:05           ` Ricardo M. Correia
2008-05-28 20:06             ` Nikita Danilov
2008-05-28 21:07               ` Ricardo M. Correia
2008-05-28 21:11                 ` Nikita Danilov
2008-05-28 21:33                   ` Ricardo M. Correia
2008-05-29  8:39                     ` Nikita Danilov
     [not found]                       ` <18496.11672.844774.815457@gargle.gargle.HOWL>
2008-05-31 15:31                         ` Ricardo M. Correia
2008-05-31 15:49                           ` Ricardo M. Correia
     [not found]                         ` <1212247447.21348.70.camel@localhost>
2008-05-31 16:19                           ` Nikita Danilov
2008-05-31 17:19                             ` Ricardo M. Correia [this message]
2008-05-31 19:11                               ` Nikita Danilov
2008-06-01  2:36                 ` Peter Braam
2008-06-01  3:17                   ` Mike Shapiro
2008-06-01  2:26       ` Peter Braam
2008-06-01  4:53         ` Jeff Bonwick
2008-06-01 13:58           ` Nikita Danilov
2008-06-03  0:50             ` Matthew Ahrens
2008-06-03  7:49               ` Nikita Danilov
2008-06-04 23:50                 ` Matthew Ahrens
2008-05-28 15:24   ` Nikita Danilov
2008-05-31 10:25     ` Peter Braam
     [not found] <92825021-D566-4805-9297-5EFBD3260D73@Sun.COM>
2008-06-01  2:44 ` Peter Braam
     [not found] <20080605083957.GQ6283@lore>
2008-06-05 11:09 ` Peter Braam
2008-06-05 12:27   ` Johann Lombardi
2008-06-05 13:45     ` Peter Braam
2008-06-06  7:33       ` Johann Lombardi
2008-06-06 12:21         ` Peter Braam
2008-06-09  8:52           ` Yong Fan
2008-06-09 15:37             ` Peter Braam
2008-06-09 16:09               ` Yong Fan
2008-06-10 13:54           ` Yong Fan
2008-06-10 16:51             ` Peter Braam

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=1212254344.21348.116.camel@localhost \
    --to=ricardo.m.correia@sun.com \
    --cc=lustre-devel@lists.lustre.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.