lkml.org 
[lkml]   [2002]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.5.2-pre7 still missing bits of kdev_t
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:15    [W:0.064 / U:1.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site