lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081224234915.GA23723@mit.edu>
Date:	Wed, 24 Dec 2008 18:49:15 -0500
From:	Theodore Tso <tytso@....EDU>
To:	Alberto Bertogli <albertito@...tiri.com.ar>
Cc:	linux-ext4@...r.kernel.org, linux-mm-cc@...ts.laptop.org,
	dm-devel@...hat.com
Subject: Re: jbd2 inside a device mapper module

On Wed, Dec 24, 2008 at 07:10:38PM -0200, Alberto Bertogli wrote:
> 
> I'm writing a small device mapper module, and I'm interested in placing
> a jbd/jdb2 journal on the backing device.
> 
> I started by trying to do a __bread() manually (just for early tests)
> inside my map function. But it got stucked, as far as I could see,
> waiting for a buffer head in wait_on_buffer() IIRC (I could track it
> down again if it's needed). And I couldn't find why it was locked, since
> it was an unused loopback device, and my code didn't even deal with
> buffer heads.

I have no idea why you would need to do manual __breads().  No doubt
I'm missing some context here.   

> Then, since I was planning on using jbd/jdb2 anyway, I decided to use it
> (and went for jbd2).
> 
> Now, I'm having issues with journal creation.
> 
> I tried using "mkfs.ext3 -O journal_dev", but jbd2_journal_load()
> complains that it can't find the journal superblock.

So I'll tell you how to do this via simple hard drives, and you can
figure out how to make it work with dm.  Note that if the journal
device isn't on a stand-alone spindle, it's probably not going to help
you.  The whole point of using an external journal device is to avoid
the seeking on the journal device, or to take advantage of the speed
of a battery-backed NVRAM device.  I'm not sure how much sense it
makes to use dm-based external journal device.... what exactly do you
hope to achieve.

To create an external journal device on the device /dev/sda:

   mke2fs -O journal_dev /dev/sda

To create a new filesystem on /dev/sdb1 that will use the external
journal found on /dev/sda:

   mke2fs -j -J device=/dev/sda /dev/sdb1

						- Ted

P.S.   All of this is in the mke2fs man page....
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ