linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org, ocfs2-devel@oss.oracle.com,
	Mark Fasheh <mfasheh@suse.com>, Joel Becker <jlbec@evilplan.org>
Subject: Re: [PATCH 1/4] quota: Don't store flags for v2 quota format
Date: Thu, 15 Jan 2015 11:13:10 +0100	[thread overview]
Message-ID: <20150115101310.GD12739@quack.suse.cz> (raw)
In-Reply-To: <20150115094034.GA32651@infradead.org>

On Thu 15-01-15 01:40:34, Christoph Hellwig wrote:
> On Wed, Jan 14, 2015 at 07:27:08PM +0100, Jan Kara wrote:
> > Currently, v2 quota format blindly stored flags from in-memory dqinfo on
> > disk, although there are no flags supported. Since it is stupid to store
> > flags which have no effect, just store 0 unconditionally and don't
> > bother loading it from disk.
> > 
> > Note that userspace could have stored some flags there via Q_SETINFO
> > quotactl and then later read them (although flags have no effect) but
> > I'm pretty sure noone does that (most definitely quota-tools don't and
> > quota interface doesn't have too much other users).
> 
> What about future proofing?  Current kernels can store flags on disk,
> so the best is to reserve the currently (and possibly previously)
> assigned values, and mask them out when reading from disk.
  Hum, I'm not sure I follow you. Current kernels will store any 32-bit
number user sets in flags field. So if we wanted to be 100% safe, we'd have
to just ignore that field. Which isn't currently a problem since quota code
doesn't use the field for anything (it was added just for future
extensions). But since I'm pretty certain noone actually relies on values
of that field, I though we could just get away with forcibly zeroing the
field now and if there's a need to use the field in a few years, we could
start using it.

								Honza

-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

  reply	other threads:[~2015-01-15 10:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-14 18:27 [PATCH 0/4] Quota cleanups Jan Kara
2015-01-14 18:27 ` [PATCH 1/4] quota: Don't store flags for v2 quota format Jan Kara
2015-01-15  9:40   ` Christoph Hellwig
2015-01-15 10:13     ` Jan Kara [this message]
2015-01-19  9:14       ` Christoph Hellwig
2015-01-19 12:34         ` Jan Kara
2015-01-14 18:27 ` [PATCH 2/4] ocfs2: Move OLQF_CLEAN flag out of generic quota flags Jan Kara
2015-01-14 18:27 ` [PATCH 3/4] quota: Cleanup flags definitions Jan Kara
2015-01-14 18:27 ` [PATCH 4/4] quota: Verify flags passed to Q_SETINFO Jan Kara

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=20150115101310.GD12739@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=hch@infradead.org \
    --cc=jlbec@evilplan.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mfasheh@suse.com \
    --cc=ocfs2-devel@oss.oracle.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).