Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312971
b: refs/heads/master
c: a117782
h: refs/heads/master
i:
  312969: 7abcfa1
  312967: 9bb425a
v: v3
  • Loading branch information
Jan Kara authored and Al Viro committed Jul 22, 2012
1 parent 3ebfadd commit d8077f0
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ceed17236a7491b44ee2be21f56a41ab997cbe7d
refs/heads/master: a1177825719ccef3f76ef39bbfd5ebb6087d53c7
6 changes: 6 additions & 0 deletions trunk/fs/ext2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,12 @@ static int ext2_sync_fs(struct super_block *sb, int wait)
struct ext2_sb_info *sbi = EXT2_SB(sb);
struct ext2_super_block *es = EXT2_SB(sb)->s_es;

/*
* Write quota structures to quota file, sync_blockdev() will write
* them to disk later
*/
dquot_writeback_dquots(sb, -1);

spin_lock(&sbi->s_lock);
if (es->s_state & cpu_to_le16(EXT2_VALID_FS)) {
ext2_debug("setting valid to 0\n");
Expand Down
5 changes: 5 additions & 0 deletions trunk/fs/ext3/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2526,6 +2526,11 @@ static int ext3_sync_fs(struct super_block *sb, int wait)
tid_t target;

trace_ext3_sync_fs(sb, wait);
/*
* Writeback quota in non-journalled quota case - journalled quota has
* no dirty dquots
*/
dquot_writeback_dquots(sb, -1);
if (journal_start_commit(EXT3_SB(sb)->s_journal, &target)) {
if (wait)
log_wait_commit(EXT3_SB(sb)->s_journal, target);
Expand Down
5 changes: 5 additions & 0 deletions trunk/fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -4325,6 +4325,11 @@ static int ext4_sync_fs(struct super_block *sb, int wait)

trace_ext4_sync_fs(sb, wait);
flush_workqueue(sbi->dio_unwritten_wq);
/*
* Writeback quota in non-journalled quota case - journalled quota has
* no dirty dquots
*/
dquot_writeback_dquots(sb, -1);
if (jbd2_journal_start_commit(sbi->s_journal, &target)) {
if (wait)
jbd2_log_wait_commit(sbi->s_journal, target);
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/gfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,8 @@ static void gfs2_put_super(struct super_block *sb)
static int gfs2_sync_fs(struct super_block *sb, int wait)
{
struct gfs2_sbd *sdp = sb->s_fs_info;

gfs2_quota_sync(sb, -1);
if (wait && sdp)
gfs2_log_flush(sdp, NULL);
return 0;
Expand Down
5 changes: 5 additions & 0 deletions trunk/fs/jfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,11 @@ static int jfs_sync_fs(struct super_block *sb, int wait)

/* log == NULL indicates read-only mount */
if (log) {
/*
* Write quota structures to quota file, sync_blockdev() will
* write them to disk later
*/
dquot_writeback_dquots(sb, -1);
jfs_flush_journal(log, wait);
jfs_syncpt(log, 0);
}
Expand Down
5 changes: 5 additions & 0 deletions trunk/fs/reiserfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ static int reiserfs_sync_fs(struct super_block *s, int wait)
{
struct reiserfs_transaction_handle th;

/*
* Writeback quota in non-journalled quota case - journalled quota has
* no dirty dquots
*/
dquot_writeback_dquots(s, -1);
reiserfs_write_lock(s);
if (!journal_begin(&th, s, 1))
if (!journal_end_sync(&th, s, 1))
Expand Down
3 changes: 0 additions & 3 deletions trunk/fs/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
*/
static int __sync_filesystem(struct super_block *sb, int wait)
{
if (sb->s_qcop && sb->s_qcop->quota_sync)
sb->s_qcop->quota_sync(sb, -1);

if (wait)
sync_inodes_sb(sb);
else
Expand Down

0 comments on commit d8077f0

Please sign in to comment.