2008-06-04 15:44:38

by Jan Kara

[permalink] [raw]
Subject: Ordered mode rewrite for jbd2/ext4

Hi,

So I've split and ported ordered mode rewrite for ext4+jbd2.
The core of the rewrite are two patches

jbd2-Implement-data-ordered-mode-handling-via-inode.patch
ext4-Use-new-framework-for-data-ordered-mode-in-JBD.patch

They also need two trivial fixes:
vfs-export-filemap_fdatawrite_range.patch
ext4-Use-new-framework-for-data-ordered-mode-in-JBD.patch

And finally there's a patch removing old ordered mode from jbd2:
jbd2-Remove-data-ordered-mode-support-using-jbd-buf.patch

I've created the patches to be added to the ext4 patch queue just
after inversion of page lock and transaction start.

I have refreshed the following patches in the ext4 queue to apply cleanly
and also fixed some typos in them and added one BUG_ON():

ext4-delalloc-sync-hang-with-journal-lock-inverse-fix.patch
ext4-delalloc-inverse-jbd-and-page-lock-ordering.patch
ext4-inverse-jbd-and-page-locking-order.patch

Finally, I've rewritten checks in writepage so
ext4-Add-validation-to-jbd-lock-inversion-patch-and.patch
should be replaced with
ext4-add-checks-to-writepage

as we spoke about it with Aneesh.

All the patches are attached and I'll also post the new ones separately for
more convenient review. The tests for 4k blocksize run fine for me. The
kernel oopses for 1k blocksize because of a problem in ext4_page_mkwrite()
- I'll post that in a separate mail. If noone objects, patches can be added
to ext4 patch queue.

Honza
--
Jan Kara <[email protected]>
SUSE Labs, CR


Attachments:
(No filename) (1.44 kB)
series.diff (823.00 B)
ext4-add-checks-to-writepage (2.64 kB)
ext4-delalloc-inverse-jbd-and-page-lock-ordering.patch (4.65 kB)
ext4-delalloc-sync-hang-with-journal-lock-inverse-fix.patch (6.93 kB)
ext4-inverse-jbd-and-page-locking-order.patch (16.98 kB)
ext4-Set-journal-pointer-to-NULL-when-journal-is-re.patch (1.27 kB)
ext4-Use-new-framework-for-data-ordered-mode-in-JBD.patch (12.33 kB)
jbd2-Implement-data-ordered-mode-handling-via-inode.patch (12.75 kB)
jbd2-Remove-data-ordered-mode-support-using-jbd-buf.patch (23.28 kB)
vfs-export-filemap_fdatawrite_range.patch (1.58 kB)
Download all attachments

2008-06-04 16:52:05

by Jan Kara

[permalink] [raw]
Subject: Re: Ordered mode rewrite for jbd2/ext4

Hello,

Sorry for replying to myself but I remembered one more thing :)

> So I've split and ported ordered mode rewrite for ext4+jbd2.
> The core of the rewrite are two patches
>
> jbd2-Implement-data-ordered-mode-handling-via-inode.patch
> ext4-Use-new-framework-for-data-ordered-mode-in-JBD.patch
>
> They also need two trivial fixes:
> vfs-export-filemap_fdatawrite_range.patch
> ext4-Use-new-framework-for-data-ordered-mode-in-JBD.patch
>
> And finally there's a patch removing old ordered mode from jbd2:
> jbd2-Remove-data-ordered-mode-support-using-jbd-buf.patch
>
> I've created the patches to be added to the ext4 patch queue just
> after inversion of page lock and transaction start.
>
> I have refreshed the following patches in the ext4 queue to apply cleanly
> and also fixed some typos in them and added one BUG_ON():
I've fixed one more problem - during umount, we were calling
ext4_da_writepages() which starts a transaction and lockdep complains
(because superblock lock ranks below transaction start). Because during
this time, we can be actually called only for special inodes (like
journal inode) from iput() we don't really need to start a transaction.
So I've added check into ext4_da_writepages() to bail out if mapping has
no pages (hmm, maybe adding there a check for mapping_tagged(mapping,
PAGECACHE_TAG_DIRTY) would be even better than what I've added).

> ext4-delalloc-sync-hang-with-journal-lock-inverse-fix.patch
> ext4-delalloc-inverse-jbd-and-page-lock-ordering.patch
> ext4-inverse-jbd-and-page-locking-order.patch
>
> Finally, I've rewritten checks in writepage so
> ext4-Add-validation-to-jbd-lock-inversion-patch-and.patch
> should be replaced with
> ext4-add-checks-to-writepage
>
> as we spoke about it with Aneesh.
>
> All the patches are attached and I'll also post the new ones separately for
> more convenient review. The tests for 4k blocksize run fine for me. The
> kernel oopses for 1k blocksize because of a problem in ext4_page_mkwrite()
> - I'll post that in a separate mail. If noone objects, patches can be added
> to ext4 patch queue.

Honza

2008-06-05 02:34:14

by Theodore Ts'o

[permalink] [raw]
Subject: Re: Ordered mode rewrite for jbd2/ext4

On Wed, Jun 04, 2008 at 05:44:35PM +0200, Jan Kara wrote:
> Hi,
>
> So I've split and ported ordered mode rewrite for ext4+jbd2.
> The core of the rewrite are two patches

I've integrated your patches into the unstable portion of the patch
queue; I have not had a chance to review them yet, but this way they
can start getting tested.

- Ted

2008-06-05 02:40:43

by Mingming Cao

[permalink] [raw]
Subject: Re: Ordered mode rewrite for jbd2/ext4

On Wed, 2008-06-04 at 17:44 +0200, Jan Kara wrote:
> Hi,
>
> So I've split and ported ordered mode rewrite for ext4+jbd2.
> The core of the rewrite are two patches
>
> jbd2-Implement-data-ordered-mode-handling-via-inode.patch
> ext4-Use-new-framework-for-data-ordered-mode-in-JBD.patch
>
> They also need two trivial fixes:
> vfs-export-filemap_fdatawrite_range.patch
> ext4-Use-new-framework-for-data-ordered-mode-in-JBD.patch
>
> And finally there's a patch removing old ordered mode from jbd2:
> jbd2-Remove-data-ordered-mode-support-using-jbd-buf.patch
>
> I've created the patches to be added to the ext4 patch queue just
> after inversion of page lock and transaction start.
>
> I have refreshed the following patches in the ext4 queue to apply cleanly
> and also fixed some typos in them and added one BUG_ON():
>
> ext4-delalloc-sync-hang-with-journal-lock-inverse-fix.patch
> ext4-delalloc-inverse-jbd-and-page-lock-ordering.patch
> ext4-inverse-jbd-and-page-locking-order.patch
>
> Finally, I've rewritten checks in writepage so
> ext4-Add-validation-to-jbd-lock-inversion-patch-and.patch
> should be replaced with
> ext4-add-checks-to-writepage
>
> as we spoke about it with Aneesh.
>
> All the patches are attached and I'll also post the new ones separately for
> more convenient review. The tests for 4k blocksize run fine for me. The
> kernel oopses for 1k blocksize because of a problem in ext4_page_mkwrite()
> - I'll post that in a separate mail. If noone objects, patches can be added
> to ext4 patch queue.
>

Thanks!

I have added the patches to the patch queue, will take a close look
later.


Regards,
Mingming
> Honza