public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Alessandro Suardi <alessandro.suardi@oracle.com>,
	linux-kernel@vger.kernel.org, andries.brouwer@cwi.nl
Subject: Re: 2.5.2-pre7 still missing bits of kdev_t
Date: Fri, 04 Jan 2002 01:52:51 -0500	[thread overview]
Message-ID: <3C355143.8FAC281D@mandrakesoft.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0201031828540.1153-100000@penguin.transmeta.com>

Linus Torvalds wrote:
> 
> On Thu, 3 Jan 2002, Jeff Garzik wrote:
> >
> > reiserfs is blindly storing the kernel's kdev_t value raw to disk.
> 
> Well, it won't do that. You have to use "kdev_t_to_nr()", which (whenever
> the format of kdev_t changes) will still be identical in the low 16 bits.
> 
> Now, if somebody actually has the raw "kdev_t" in their on-disk
> structures, that's a real problem, but I don't think anybody does.
> Certainly I didn't see reiserfs do it (but it may well be missing a few
> "kdev_t_to_nr()" calls)

AFAICS it does:

include/linux/reiserfs.h:
#define sd_v1_rdev(sdp)         (le32_to_cpu((sdp)->u.sd_rdev))
#define set_sd_v1_rdev(sdp,v)   ((sdp)->u.sd_rdev = cpu_to_le32(v))

[jgarzik@rum reiserfs]$ grep v1_rdev *.c
inode.c:        rdev = sd_v1_rdev(sd);
inode.c:        set_sd_v1_rdev(sd_v1, inode->i_rdev );

In the first inode.c line shown here, it passes the value received
directly to init_special_inode.

	Jeff


-- 
Jeff Garzik      | Only so many songs can be sung
Building 1024    | with two lips, two lungs, and one tongue.
MandrakeSoft     |         - nomeansno

  reply	other threads:[~2002-01-04  6:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-04  0:05 2.5.2-pre7 still missing bits of kdev_t Alessandro Suardi
2002-01-04  0:13 ` Jeff Garzik
2002-01-04  2:32   ` Linus Torvalds
2002-01-04  6:52     ` Jeff Garzik [this message]
2002-01-04 16:45       ` Linus Torvalds
2002-01-04 17:34         ` Nikita Danilov
2002-01-04 17:51           ` Jeff Garzik
2002-01-04 17:53             ` Linus Torvalds
2002-01-04 18:11               ` Alexander Viro
  -- strict thread matches above, loose matches on Subject: below --
2002-01-04  1:47 Andries.Brouwer
2002-01-04 13:21 Andries.Brouwer
2002-01-04 19:24 Andries.Brouwer
2002-01-04 21:10 ` Alexander Viro
2002-01-04 21:14   ` Linus Torvalds
2002-01-05  0:10     ` Alan Cox
2002-01-04 19:32 Andries.Brouwer

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=3C355143.8FAC281D@mandrakesoft.com \
    --to=jgarzik@mandrakesoft.com \
    --cc=alessandro.suardi@oracle.com \
    --cc=andries.brouwer@cwi.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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