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

Nikita Danilov wrote:
> 
> Linus Torvalds writes:
>  >
>  > On Fri, 4 Jan 2002, Jeff Garzik wrote:
>  > > >
>  > > > 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))
>  >
>  > Ok, just add the proper conversion functions, ie a "to_kdev_t()" and
>  > "kdev_t_to_nr()".
> 
> Actually, result of sd_v1_rdev() is only passed to init_special_inode()
> which takes int rather than kdev_t.
> 
> Isn't this a bit strange, because file system backend has to convert
> kdev_t to u32 on write, but not on read?

As mentioned to viro on IRC, I think init_special_inode should take
major and minor arguments, to nudge the filesystem implementors into
thinking that major and minor should be treated separately, and be given
additional thought as to how they are encoded on-disk.

(I suggested having init_special_inode taking a kdev_t argument as its
third arg, but viro yelled at me :))

	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 17:51 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
2002-01-04 16:45       ` Linus Torvalds
2002-01-04 17:34         ` Nikita Danilov
2002-01-04 17:51           ` Jeff Garzik [this message]
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=3C35EB95.FAE9E4BE@mandrakesoft.com \
    --to=jgarzik@mandrakesoft.com \
    --cc=Nikita@Namesys.COM \
    --cc=alessandro.suardi@oracle.com \
    --cc=andries.brouwer@cwi.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=viro@math.psu.edu \
    /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