mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: Quota mods needed for journaled quota
       [not found] <20001025184239.U6085@redhat.com>
@ 2000-10-26 16:53 ` Nathan Scott
       [not found]   ` <20001026110029.K20050@redhat.com>
  2000-10-31 15:09 ` Jan Kara
  1 sibling, 1 reply; 4+ messages in thread
From: Nathan Scott @ 2000-10-26 16:53 UTC (permalink / raw)
  To: Stephen C. Tweedie, Jan Kara, jank, Linus Torvalds
  Cc: linux-kernel, linux-fsdevel, linux-xfs

hi Stephen,

On Oct 25,  6:42pm, Stephen C. Tweedie wrote:
> Subject: Quota mods needed for journaled quota
> ...
> All of these could be fixed very easily (at least for ext3) if it were
> possible for ext3 to install its own version of the superblock->dq_ops
> quota operations (which would just be simple wrappers around the
> existing quota calls).  However, the current sys_quotactl installs the
> default quota_ops into the superblock on quota_on without any chance
> for the filesystem to override it.
> 
> The addition of an "init_quota" method to the super_operations struct,
> with quota_on calling this and defaulting to installing the default
> quota_ops if the method is NULL, ought to be sufficient to let ext3
> get quotas right in all cases as far as I can see.
> 
> Comments?
> 

It might also/alternatively be generally useful to allow a
filesystem-specific implementation of quotactl itself - through
an additional member in the dquot_operations set of functions?

This would allow ext3 to do that which it needs to do differently
at Q_QUOTAON and would also allow Jan's changes to work in such
a way that both the current form of dquot structure and his new
version of dquots could be used together (his patches currently
change the ondisk dquot definition, which means the existing user
tools get back different structures to what they were expecting,
after issuing certain quotactl commands).

XFS also has its own, different ondisk format for dquots, which
it would like to pass over the quotactl interface - I imagine
filesystems coming from other OSs would too.  The quotactl
syscall is sufficiently generic - its alot like ioctl ;-) -
to allow any size/form of dquot to be passed back to userspace,
so a few new quotactl commands for Jan's new dquot structure
would allow the existing tools to continue to work & new user
tools could take advantage of his extensions (same again for XFS).

Anyway, hope this is useful input.


cheers.

ps: hmm - just realized something... is jank@redhat == jack@suse?

-- 
Nathan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: Quota mods needed for journaled quota
       [not found]   ` <20001026110029.K20050@redhat.com>
@ 2000-10-27 14:03     ` Nathan Scott
  2000-10-31 15:25       ` Jan Kara
  0 siblings, 1 reply; 4+ messages in thread
From: Nathan Scott @ 2000-10-27 14:03 UTC (permalink / raw)
  To: Stephen C. Tweedie
  Cc: Jan Kara, jank, Linus Torvalds, linux-kernel, linux-fsdevel, linux-xfs

hi Stephen,

On Oct 26, 11:00am, Stephen C. Tweedie wrote:
> Subject: Re: Quota mods needed for journaled quota
> ...
> > This would allow ext3 to do that which it needs to do differently
> > at Q_QUOTAON and would also allow Jan's changes to work in such
> > a way that both the current form of dquot structure and his new
> > version of dquots could be used together
> 
> Adding the init_quota hook would do that, as the filesystem will be
> able to install its own dq_ops methods during the init so we get the
> flexibility you are asking for anyway.
> 

Hmmm ... I'm not so sure.  In order to have the flexibility
of filesystem-specific dquot formats, the struct dquot would
need to become more like struct inode/super_block, i.e. not
hardcoding the ondisk structure into the incore structure
(using a union and a generic pointer, as inode/super_block do).

The DQUOT_SYNC mechanism would need to be able to be overridden
per-filesystem also.  It isn't really as cut-and-dried as "per-
filesystem" either, because an ext2/3 filesystem might make use
of either the original dquot format or Jan's newer format, either
at mount time or even after doing a quota_off & quota_on with a
new quota file format (that would be quite clean).

But I've sidetracked completely from what you were originally
talking about now, which had nothing to do with a different
ondisk format at all.

cheers.

-- 
Nathan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: Quota mods needed for journaled quota
       [not found] <20001025184239.U6085@redhat.com>
  2000-10-26 16:53 ` Quota mods needed for journaled quota Nathan Scott
@ 2000-10-31 15:09 ` Jan Kara
  1 sibling, 0 replies; 4+ messages in thread
From: Jan Kara @ 2000-10-31 15:09 UTC (permalink / raw)
  To: Stephen C. Tweedie; +Cc: jank, Linus Torvalds, linux-kernel, linux-fsdevel

  Hello.

> There are a few problems in the Linux quota code which make it
> impossible to perform quota updates transactionally when using a
> journaled filesystem.
> 
> Basically we have the following problems:
> 
>  * The underlying filesystem does not know which files are the quota
>    files, so cannot tell when to apply journaling consistency
>    guarantees to data writes
> 
>  * "chown" is not transactional: the filesystem is given no
>    opportunity to wrap the quota transfer and the owner-attribute
>    notify-change call into a single transaction.
  In my quota fix this has changed a bit as now filesystem's notify_change()
is calling dquot_transfer() (it was needed due to some races and I think it's
also more consistent with how other quota calls work). So this problem
should exist no more.
  
> All of these could be fixed very easily (at least for ext3) if it were
> possible for ext3 to install its own version of the superblock->dq_ops
> quota operations (which would just be simple wrappers around the
> existing quota calls).  However, the current sys_quotactl installs the
> default quota_ops into the superblock on quota_on without any chance
> for the filesystem to override it.
> 
> The addition of an "init_quota" method to the super_operations struct,
> with quota_on calling this and defaulting to installing the default
> quota_ops if the method is NULL, ought to be sufficient to let ext3
> get quotas right in all cases as far as I can see.
  Actually I was proposing something similar in my reaction on dquot hang in
ext3... The only difference was that I proposed to install dq_ops in
foo_read_super() so that it will be more consistent with how other callbacks
work. And in my fix of quota I removed testing of dq_ops being NULL so
operations can be set during all life (mount time) of filesystem.

								Honza
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: Quota mods needed for journaled quota
  2000-10-27 14:03     ` Nathan Scott
@ 2000-10-31 15:25       ` Jan Kara
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kara @ 2000-10-31 15:25 UTC (permalink / raw)
  To: Nathan Scott
  Cc: Stephen C. Tweedie, Jan Kara, jank, Linus Torvalds, linux-kernel,
	linux-fsdevel, linux-xfs

  Hello.

> On Oct 26, 11:00am, Stephen C. Tweedie wrote:
> > Subject: Re: Quota mods needed for journaled quota
> > ...
> > > This would allow ext3 to do that which it needs to do differently
> > > at Q_QUOTAON and would also allow Jan's changes to work in such
> > > a way that both the current form of dquot structure and his new
> > > version of dquots could be used together
> > 
> > Adding the init_quota hook would do that, as the filesystem will be
> > able to install its own dq_ops methods during the init so we get the
> > flexibility you are asking for anyway.
> > 
> 
> Hmmm ... I'm not so sure.  In order to have the flexibility
> of filesystem-specific dquot formats, the struct dquot would
> need to become more like struct inode/super_block, i.e. not
> hardcoding the ondisk structure into the incore structure
> (using a union and a generic pointer, as inode/super_block do).
> 
> The DQUOT_SYNC mechanism would need to be able to be overridden
> per-filesystem also.  It isn't really as cut-and-dried as "per-
> filesystem" either, because an ext2/3 filesystem might make use
> of either the original dquot format or Jan's newer format, either
> at mount time or even after doing a quota_off & quota_on with a
> new quota file format (that would be quite clean).
  Hmm. Probably I wouldn't allow to override quotactl() but make it like
other callbacks - operations like quota_on() quota_off() and so
could be overridden (or better filesystem could specify callback to be called
after some generic work), quotactl() will call foo_quotactl() if it won't
recognize the operation number.
  But I don't feel urgent need of this redesign so I would wait for some
time so current fixes can settle down...

								Honza

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

end of thread, other threads:[~2000-10-31 15:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20001025184239.U6085@redhat.com>
2000-10-26 16:53 ` Quota mods needed for journaled quota Nathan Scott
     [not found]   ` <20001026110029.K20050@redhat.com>
2000-10-27 14:03     ` Nathan Scott
2000-10-31 15:25       ` Jan Kara
2000-10-31 15:09 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®