lkml.org 
[lkml]   [2008]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: jbd2 inside a device mapper module
On Thu, Dec 25, 2008 at 10:37:36PM -0500, Theodore Tso wrote:
> On Thu, Dec 25, 2008 at 10:00:05PM -0200, Alberto Bertogli wrote:
> >
> > I think I'm not explaining myself correctly. My code has _nothing_ to do
> > with ext2/3/4 (or any other filesystem) whatsoever. I'm not using the
> > journal as an external one for a filesystem. I want to use it to be able
> > to do atomic writes in my own, filesystem independant, device-mapper
> > code.
>
> How many block writes are you batching into a single transaction? If
> you're not careful you may find that performance overhead will be
> quite expensive.

At this moment I'm trying to keep it simple, so I plan to batch two for
each sector written to the device: one for the metadata and one for the
data.


> > After what you told me (both this and the deprecation of
> > jbd2_journal_create()), I took a look at e2fsprogs' source. From what I
> > could see, "mke2fs -O journal_dev" creates the external journal inside
> > some ext2/3/4 structures, which caused my journal-loading code to fail
> > (because it doesn't know about ext stuff).
>
> Yes, this is necessary because in a production system you need to be
> able to identify the external journal by UUID, and the ext2/3/4
> superblock makes it easy to add a label, UUID, et. al. It also
> significantly lowers the chance that an external journal will get
> misidentified as some other filesystem based on the data stored in the
> journal.

Yes, it makes sense. I've reserved the first sector for that purpose.

Thanks a lot,
Alberto



\
 
 \ /
  Last update: 2008-12-26 17:21    [W:0.991 / U:0.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site