From: "Mika Penttilä" <mika.penttila@kolumbus.fi>
To: Miquel van Smoorenburg <miquels@cistron.nl>
Cc: linux-kernel@vger.kernel.org
Subject: Re: /dev/root: which approach ? [PATCH]
Date: Wed, 10 Mar 2004 22:17:55 +0200 [thread overview]
Message-ID: <404F77F3.9070106@kolumbus.fi> (raw)
In-Reply-To: <20040310162003.GA25688@cistron.nl>
>My question to the FS hackers: which one is the preferred approach?
>
>
>dev_root_alias.patch
>
>--- linux-2.6.4-rc2-mm1.orig/fs/block_dev.c 2004-03-09 17:14:32.000000000 +0100
>+++ linux-2.6.4-rc2-mm1/fs/block_dev.c 2004-03-10 16:39:30.000000000 +0100
>@@ -338,6 +338,16 @@ struct block_device *bdget(dev_t dev)
> {
> struct block_device *bdev;
> struct inode *inode;
>+ struct vfsmount *mnt;
>+
>+ /* See if device is the /dev/root alias. */
>+ if (dev == MKDEV(4, 1)) {
>+ read_lock(¤t->fs->lock);
>+ mnt = mntget(current->fs->rootmnt);
>+ dev = mnt->mnt_sb->s_dev;
>+ mntput(mnt);
>+ read_unlock(¤t->fs->lock);
>+ }
>
> inode = iget5_locked(bd_mnt->mnt_sb, hash(dev),
> bdev_test, bdev_set, &dev);
>
>
what is this 4,1, a tty???
--Mika
next prev parent reply other threads:[~2004-03-10 20:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-10 16:20 /dev/root: which approach ? [PATCH] Miquel van Smoorenburg
2004-03-10 20:01 ` Andrew Morton
2004-03-10 20:18 ` Miquel van Smoorenburg
2004-03-10 20:17 ` Mika Penttilä [this message]
2004-03-10 20:52 ` Miquel van Smoorenburg
2004-03-12 8:10 ` H. Peter Anvin
2004-03-10 21:01 ` Chris Wedgwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=404F77F3.9070106@kolumbus.fi \
--to=mika.penttila@kolumbus.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=miquels@cistron.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox