lkml.org 
[lkml]   [2006]   [Feb]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 10 Feb 2006 16:42:56 +0100
FromErik Mouw <>
SubjectRe: CD writing in future Linux (stirring up a hornets' nest)
On Fri, Feb 10, 2006 at 03:54:44PM +0100, Joerg Schilling wrote:
> "Theodore Ts'o" <tytso@mit.edu> wrote:
> > On Fri, Feb 10, 2006 at 03:32:28PM +0100, Joerg Schilling wrote:
> > > A particular file on the system must not change st_dev while the system
> > > is running.> > > > > > http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html> >> > 1)  File != device.
> 
> I am sorry, but it turns out that you did not understand the problem.

Why do you start an ad hominem attack every time somebody shows you're
wrong for technical reasons?

> Try to inform yourself about the relevence (and content) of st_dev before
> replying again.

It has no relevance. st_dev holds the device number of the device
containing the file. That means that if /dev/hda (3,01) is on /dev, it
contains the device number of filesystem of /dev, 0x0b in my case (udev
using tmpfs):

  root@arthur:/home # stat /dev/hda
    File: `/dev/hda'
    Size: 0               Blocks: 0          IO Block: 4096   block special file
  Device: bh/11d  Inode: 548         Links: 1     Device type: 3,0
  [...]

If I create that same special file "hda" in /home, I get:

  root@arthur:/home # mknod hda b 3 0
  root@arthur:/home # stat hda
    File: `hda'
    Size: 0               Blocks: 0          IO Block: 4096   block special file
  Device: 308h/776d       Inode: 3026        Links: 1     Device type: 3,0
  [...]

It's the same device because st_rdev is the same in both cases, it just
lives on a different filesystem. You can use either device to operate
on.


Erik

-- 
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --
| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands
-
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: 2006-02-10 15:45    [from the cache]
©2003-2008