public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Jan Kara <jack@suse.cz>
Cc: Jiri Kosina <jkosina@suse.cz>,
	linux-kernel@vger.kernel.org, Dave Chinner <david@fromorbit.com>
Subject: Re: PRJQUOTA case not handled in need_print_warning()
Date: Tue, 09 Oct 2012 15:05:24 -0700	[thread overview]
Message-ID: <87txu32tej.fsf@xmission.com> (raw)
In-Reply-To: <20121009214227.GC27882@quack.suse.cz> (Jan Kara's message of "Tue, 9 Oct 2012 23:42:27 +0200")

Jan Kara <jack@suse.cz> writes:

> On Fri 05-10-12 00:34:29, Jiri Kosina wrote:
>> Hi,
>> 
>> commit e8a3e4719b7ec19288c56f22623f537cb78885c1
>> Author: Eric W. Biederman <ebiederm@xmission.com>
>> Date:   Sun Sep 16 01:11:45 2012 -0700
>> 
>>     userns: Implement struct kqid
>> 
>> causes this warning:
>> 
>> fs/quota/dquot.c: In function ‘need_print_warning’:
>> fs/quota/dquot.c:1158: warning: enumeration value ‘PRJQUOTA’ not handled in switch
>> 
>> and it seems to be a valid one -- the switch in need_print_warning() 
>> contains neither 'default' nor PRJQUOTA case handler.
>   Hum, since Eric didn't seem to care, I've fixed this up myself with the
> attached patch. Actually, PRJQUOTA should never get to that function so it
> shouldn't cause any problems in practice. Thanks for the report.

Sorry about that.  I knew there was no functional regression as the
functional part of the code had not changed.  I was waiting for a my
head to have a clear moment where I could look through and see if
PRJQUOTA could ever make it there.

Having just made the time to look at it and see that this all goes
to dquot_alloc_space and is not related to the more general
quota_send_warning path I agree that in practice we will never get there
with a PRJQUOTA as xfs is the only filesystem that supports project
quotas and xfs does not call dquot_alloc_space.

If another filesytem were to support project quotas and used the dquot
infrastructure it is theoretically possible to reach need_warning
with a project quota.  But even in that theoretical case since project
quotas identifiers do not attach themselves to tasks it looks like
ignoring them is the right thing to do.

Eric


      reply	other threads:[~2012-10-09 22:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-04 22:34 PRJQUOTA case not handled in need_print_warning() Jiri Kosina
2012-10-09 21:42 ` Jan Kara
2012-10-09 22:05   ` Eric W. Biederman [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=87txu32tej.fsf@xmission.com \
    --to=ebiederm@xmission.com \
    --cc=david@fromorbit.com \
    --cc=jack@suse.cz \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@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