linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ->quota_sync
@ 2011-07-19 16:14 Christoph Hellwig
  2011-07-20 13:31 ` ->quota_sync Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2011-07-19 16:14 UTC (permalink / raw)
  To: Jan Kara; +Cc: swhiteho, linux-fsdevel

Hi Jan,

is there any reason the ->quota_sync operations (which always ends up in
dquot_quota_sync, or gfs2_quota_sync) is called before writing back the
inodes?  Given that writeback can perform allocations in filesystem not
using ->page_mkwrite or at least cause delalloc conversions that seems
like the wrong place to me.  Even more so fixing the placement means
we could just call dquot_quota_sync from ->sync_fs, similar how XFS
does it's quota writeout, and thus avoiding the duplicate call to
->sync_fs from inside dquot_quota_sync, as well as getting rid of the
abuse of the quotactl ops from VFS code.

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

* Re: ->quota_sync
  2011-07-19 16:14 ->quota_sync Christoph Hellwig
@ 2011-07-20 13:31 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2011-07-20 13:31 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Jan Kara, swhiteho, linux-fsdevel

  Hi,

On Tue 19-07-11 12:14:06, Christoph Hellwig wrote:
> is there any reason the ->quota_sync operations (which always ends up in
> dquot_quota_sync, or gfs2_quota_sync) is called before writing back the
> inodes?
  Hmm, historically, there was a reason because writing of quota entries
might have needed to allocate new blocks to quota file.  But these days I
don't see any reason since we allocate necessary blocks when quota entry is
first looked up and directly modify block device pages when it is modified.

> Given that writeback can perform allocations in filesystem not
> using ->page_mkwrite or at least cause delalloc conversions that seems
> like the wrong place to me.
  Yes, doing quota writeout after inode writeout would be a more logical
place.

> Even more so fixing the placement means
> we could just call dquot_quota_sync from ->sync_fs, similar how XFS
> does it's quota writeout, and thus avoiding the duplicate call to
> ->sync_fs from inside dquot_quota_sync, as well as getting rid of the
> abuse of the quotactl ops from VFS code.
  True. I'll add these changes to my patches cleaning up sync code.

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

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

end of thread, other threads:[~2011-07-20 13:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-19 16:14 ->quota_sync Christoph Hellwig
2011-07-20 13:31 ` ->quota_sync Jan Kara

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).