All of lore.kernel.org
 help / color / mirror / Atom feed
* can we simplify the quota matrix in ext4?
@ 2011-06-21 18:45 Eric Sandeen
  2011-06-21 19:24 ` Andreas Dilger
  2011-06-21 20:58 ` Eric Sandeen
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Sandeen @ 2011-06-21 18:45 UTC (permalink / raw)
  To: ext4 development

I was looking at 

62d2b5f2dcd3707b070efb16bbfdf6947c38c194 ext4: Always journal quota file modifications

and was thinking - if we always journal, why do we still have all the mount options etc for journaled quota?

I guess without -o usrjquota=foo we don't journal right from mount time, and there are a few other paths that get skipped, but those seem like details...

It seems that ideally - and perhaps this is hindsight - ext4 should have defaulted to journaled, QFMT_VFS_V1 quotas only... is there any reason not to?

I'm still not very well versed in vfs quota, but does it seem possible to move in this direction?  It seems odd that we should still be supporting unjournaled, vfsold-format quotas in ext4 these days.  What's the point?

If it seems possible to move in this direction within the exiting quota framework I'd be interested in trying to get it done.

Thanks,
-Eric

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: can we simplify the quota matrix in ext4?
  2011-06-21 18:45 can we simplify the quota matrix in ext4? Eric Sandeen
@ 2011-06-21 19:24 ` Andreas Dilger
  2011-06-22  6:35   ` Aditya Kali
  2011-06-21 20:58 ` Eric Sandeen
  1 sibling, 1 reply; 5+ messages in thread
From: Andreas Dilger @ 2011-06-21 19:24 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ext4 development

On 2011-06-21, at 12:45 PM, Eric Sandeen wrote:
> I was looking at 
> 
> 62d2b5f2dcd3707b070efb16bbfdf6947c38c194 ext4: Always journal quota file modifications
> 
> and was thinking - if we always journal, why do we still have all the mount options etc for journaled quota?
> 
> I guess without -o usrjquota=foo we don't journal right from mount time, and there are a few other paths that get skipped, but those seem like details...
> 
> It seems that ideally - and perhaps this is hindsight - ext4 should have defaulted to journaled, QFMT_VFS_V1 quotas only... is there any reason not to?

This would be the ideal situation for Lustre as well.  The remaining issue,
AFAIK, is that e2fsck needs to do quota accounting internally so that there
is never a need to run a quotacheck on the filesystem.

Since e2fsck is already traversing all of the inodes, this is no extra effort
to keep a handful of bytes (inode count, blocks count) for each user.  I
believe there was someone at Google working on this?  Haven't seen any output
so far, however.

> I'm still not very well versed in vfs quota, but does it seem possible to
> move in this direction?  It seems odd that we should still be supporting
> unjournaled, vfsold-format quotas in ext4 these days.  What's the point?

I totally agree.

> If it seems possible to move in this direction within the exiting quota
> framework I'd be interested in trying to get it done.
> 
> Thanks,
> -Eric
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Cheers, Andreas






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: can we simplify the quota matrix in ext4?
  2011-06-21 18:45 can we simplify the quota matrix in ext4? Eric Sandeen
  2011-06-21 19:24 ` Andreas Dilger
@ 2011-06-21 20:58 ` Eric Sandeen
  2011-06-21 21:06   ` Andreas Dilger
  1 sibling, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2011-06-21 20:58 UTC (permalink / raw)
  To: ext4 development

On 6/21/11 1:45 PM, Eric Sandeen wrote:
> I was looking at 
> 
> 62d2b5f2dcd3707b070efb16bbfdf6947c38c194 ext4: Always journal quota file modifications
> 
> and was thinking - if we always journal, why do we still have all the mount options etc for journaled quota?
> 
> I guess without -o usrjquota=foo we don't journal right from mount time, and there are a few other paths that get skipped, but those seem like details...
> 
> It seems that ideally - and perhaps this is hindsight - ext4 should have defaulted to journaled, QFMT_VFS_V1 quotas only... is there any reason not to?
> 
> I'm still not very well versed in vfs quota, but does it seem possible to move in this direction?  It seems odd that we should still be supporting unjournaled, vfsold-format quotas in ext4 these days.  What's the point?
> 
> If it seems possible to move in this direction within the exiting quota framework I'd be interested in trying to get it done.

I was hoping that perhaps newer quota tools would only write newer quota formats to a fresh filesystem, and that would make things simpler, since only newer quota tools can understand ext4 in any case.

Sadly, no: "quotacheck -F vfsold" will happily write the old format quota file on an ext4 filesystem, even if that's not the default it'd choose.

So I guess a deprecation period would need to be endured on the formats.

And without knowing the format in use, we can't know the quota filename(?) so we can't do journaled quota on mount, either, I think, at least without the -o jqfmt=blah?  Unless we look up both quota.user and aquota.user?  But what if both are there?  Bleah.

-Eric

> Thanks,
> -Eric

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: can we simplify the quota matrix in ext4?
  2011-06-21 20:58 ` Eric Sandeen
@ 2011-06-21 21:06   ` Andreas Dilger
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Dilger @ 2011-06-21 21:06 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ext4 development

On 2011-06-21, at 2:58 PM, Eric Sandeen wrote:
> On 6/21/11 1:45 PM, Eric Sandeen wrote:
>> I was looking at 
>> 
>> 62d2b5f2dcd3707b070efb16bbfdf6947c38c194 ext4: Always journal quota file modifications
>> 
>> and was thinking - if we always journal, why do we still have all the mount options etc for journaled quota?
>> 
>> I guess without -o usrjquota=foo we don't journal right from mount time, and there are a few other paths that get skipped, but those seem like details...
>> 
>> It seems that ideally - and perhaps this is hindsight - ext4 should have defaulted to journaled, QFMT_VFS_V1 quotas only... is there any reason not to?
>> 
>> I'm still not very well versed in vfs quota, but does it seem possible to move in this direction?  It seems odd that we should still be supporting unjournaled, vfsold-format quotas in ext4 these days.  What's the point?
>> 
>> If it seems possible to move in this direction within the exiting quota framework I'd be interested in trying to get it done.
> 
> I was hoping that perhaps newer quota tools would only write newer quota formats to a fresh filesystem, and that would make things simpler, since only newer quota tools can understand ext4 in any case.
> 
> Sadly, no: "quotacheck -F vfsold" will happily write the old format quota file on an ext4 filesystem, even if that's not the default it'd choose.
> 
> So I guess a deprecation period would need to be endured on the formats.
> 
> And without knowing the format in use, we can't know the quota filename(?) so we can't do journaled quota on mount, either, I think, at least without the -o jqfmt=blah?  Unless we look up both quota.user and aquota.user?  But what if both are there?  Bleah.

I believe there are reserved fields in the superblock for the quota inodes.
It would be possible to save the inode numbers into those fields the first
time that the filesystem is mounted with a new kernel and/or run with a new
e2fsck, even if ext4 still leaves those files in existence.


Cheers, Andreas






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: can we simplify the quota matrix in ext4?
  2011-06-21 19:24 ` Andreas Dilger
@ 2011-06-22  6:35   ` Aditya Kali
  0 siblings, 0 replies; 5+ messages in thread
From: Aditya Kali @ 2011-06-22  6:35 UTC (permalink / raw)
  To: Andreas Dilger; +Cc: Eric Sandeen, ext4 development

On Tue, Jun 21, 2011 at 12:24 PM, Andreas Dilger <adilger@dilger.ca> wrote:
> On 2011-06-21, at 12:45 PM, Eric Sandeen wrote:
>> I was looking at
>>
>> 62d2b5f2dcd3707b070efb16bbfdf6947c38c194 ext4: Always journal quota file modifications
>>
>> and was thinking - if we always journal, why do we still have all the mount options etc for journaled quota?
>>
>> I guess without -o usrjquota=foo we don't journal right from mount time, and there are a few other paths that get skipped, but those seem like details...
>>
>> It seems that ideally - and perhaps this is hindsight - ext4 should have defaulted to journaled, QFMT_VFS_V1 quotas only... is there any reason not to?
>
> This would be the ideal situation for Lustre as well.  The remaining issue,
> AFAIK, is that e2fsck needs to do quota accounting internally so that there
> is never a need to run a quotacheck on the filesystem.
>
> Since e2fsck is already traversing all of the inodes, this is no extra effort
> to keep a handful of bytes (inode count, blocks count) for each user.  I
> believe there was someone at Google working on this?  Haven't seen any output
> so far, however.
>
I have the changes for fixing quota usage during e2fsck with support
for QFMT_VFS_V1 format. Currently, I am using tune2fs to create the
quota inodes and set the superblock fields. On the next mount of the
filesystem, the kernel should automatically enable quotas for the
inodes that are specified in superblock.
I will send the patches out for review soon (hopefully this week).

>> I'm still not very well versed in vfs quota, but does it seem possible to
>> move in this direction?  It seems odd that we should still be supporting
>> unjournaled, vfsold-format quotas in ext4 these days.  What's the point?
>
> I totally agree.
>
>> If it seems possible to move in this direction within the exiting quota
>> framework I'd be interested in trying to get it done.
>>
>> Thanks,
>> -Eric
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
> Cheers, Andreas
>
>
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Thanks,
--
Aditya
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-06-22  6:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-21 18:45 can we simplify the quota matrix in ext4? Eric Sandeen
2011-06-21 19:24 ` Andreas Dilger
2011-06-22  6:35   ` Aditya Kali
2011-06-21 20:58 ` Eric Sandeen
2011-06-21 21:06   ` Andreas Dilger

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.