[lkml]   [2012]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 1/7] Adding support to freeze and unfreeze a journal
On Tue 10-01-12 16:13:46, Surbhi Palande wrote:
> >> If all the write operations were journaled, then this patch would not allow
> >> ext4 filesystem to have any dirty data after its frozen.
> >> (as journal_start() would block).
> >>
> >>  I think the only one candidate that creates dirty data without calling
> >> ext4_journal_start() is mmapped?
> >  No, the problem is in any write path. The problem is with operations
> > that happen during the phase when s_frozen == SB_FREEZE_WRITE. These
> > operations dirty the filesystem but running sync may easily miss them.
> > During this phase journal is not frozen so that does not help you in any
> > way.
> >
> >                                                                Honza
> Ok! No new transaction can really start after the journal is frozen.
> But we can have dirty data after SB_FREEZE_WRITE and before
> I agree with you. However, can this be fixed by adding a
> sync_filesystem() in freeze_super() after the sb->s_op->freeze_fs() is
> over?
The problem with this is that to do writeback you need to start a
transaction. So you would deadlock.

> So then essentially, when freeze_super() returns, the page cache is clean?
> I do definitely agree that the fix is to add a lock for mutual
> exclusion between freeze filesystem and writes to a frozen filesystem.
Yes, that would be the cleanest solution but it's quite some work.

Jan Kara <>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2012-01-11 01:53    [from the cache]
©2003-2011 Jasper Spaans