Re: [PATCH] ext4: Always journal quota file modifications

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jan Kara
Date: Friday, June 4, 2010 - 7:45 am

On Thu 03-06-10 13:10:58, tytso@mit.edu wrote:
  sb->s_op->sync_fs() is ext4_sync_fs() which does:

        flush_workqueue(sbi->dio_unwritten_wq);
        if (jbd2_journal_start_commit(sbi->s_journal, &target)) {
                if (wait)
                        jbd2_log_wait_commit(sbi->s_journal, target);
        }

  So it does force out a journal commit and thus quota data. Or am I
missing something?

  Syncing quota files in vfs_load_quota_inode() is not enough because
for filesystems with blocksize < pagesize we could still have dirty
buffers in the same blockdev page as used by a quota file. Thus subsequent
invalidate_bdev() does not remove the blockdev's page and kernel will still
see old data (i.e., not new data written by e.g. setquota via page cache).
This cache aliasing with quotas is nasty...

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR
--
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] ext4: Always journal quota file modifications, Dmitry Monakhov, (Thu Jun 3, 2:07 am)
Re: [PATCH] ext4: Always journal quota file modifications, Dmitry Monakhov, (Thu Jun 3, 7:13 am)
Re: [PATCH] ext4: Always journal quota file modifications, Bernd Schubert, (Thu Jun 3, 9:47 am)
Re: [PATCH] ext4: Always journal quota file modifications, Jan Kara, (Fri Jun 4, 7:45 am)