Re: Help in finding a file needed



On 2008-02-08 01:57:02 +0000, real-address-in-sig@xxxxxxxxxxxxxxx (Rowland McDonnell) said:

Chris Ridd <chrisridd@xxxxxxx> wrote:

(Rowland McDonnell) said:

Chris Ridd <chrisridd@xxxxxxx> wrote:

(Rowland McDonnell) said:

Chris Ridd <chrisridd@xxxxxxx> wrote:

(Rowland McDonnell) said:

Chris Ridd <chrisridd@xxxxxxx> wrote:

(Rowland McDonnell) said:

explained the important bit: an open file handle points directly
to the file data location on disc.

There's a lot of code between the idea of a "file handle" and the
location of the blocks on disk, but I think that's a reasonable
simplification of what's going on.

Mmmm... He murmered, suspiciously.

What sort of code are you referring to? Or, put it another way, how

In the bowels of the kernel. User programs don't get to see which
blocks are being used.

Well, yeah (unless the user programs ask - the kernel can report, can't
it?)

Yes, but there's no API that I know of for doing that, and I suspect
there won't be as that's a layering violation.

Whassat mean?

Large bits of software are often built using layers of different
abstractions, and it is usually considered bad to expose a lower level
abstraction to the higher levels - it makes things harder to debug, and
harder (sometimes) to optimize.

Righto.

For what we were talking about, the top layer provides an abstraction
which uses a file handle to access a stream of bytes.

Yep.

Then you go down and usually have a virtual file system layer, which
basically says all file systems must provide the following API.

(`the following API' - what's that? I see no API following.)

Basic things like "open a file", "mount a filesystem", "read a file", etc etc.

Underneath that you may have specific filesystem code, eg HFS+, FAT,
UFS, etc. Underneath *that* you have virtual device code, underneath
that you have SCSI code, FW code, etc. Underneath *that* you have disk
controllers somewhere. I'm probably missing some stuff out - RAID for
starters.

The wires and sockets are one layer of such standards.

Yes.

One of the interesting things about ZFS is that it violates all this
stuff, so that it can be smarter about handling errors, and so that it
can be smarter about using multiple devices together. That's also the
reason why some people dislike it.

I've yet to figure out anything much about ZFS. The stuff on the Web
seems to be either too vague to make any sense at all (executive summary
analogy type things that mean nothing), or so technical that it makes no
sense at all unless you're steeped in OS lore and have the time to read
up on all the details.

I'm not I've seen much in between either. The Wikipedia's OK, but don't imagine it'll ever tell you "how" something works.

Cheers,

Chris

.



Relevant Pages

  • Re: Help in finding a file needed
    ... to the file data location on disc. ... Underneath that you may have specific filesystem code, eg HFS+, FAT, UFS, etc. Underneath *that* you have virtual device code, underneath that you have SCSI code, FW code, etc. Underneath *that* you have disk controllers somewhere. ... That's also the reason why some people dislike it. ...
    (uk.comp.sys.mac)
  • Re: A linux alternative to the "ghost" programs?
    ... I'd just like to say that the reason I don't know what ... > master boot record to point to the old partition records, ... >> mirror image of the 30 gig after the operation. ... > That would copy all of one disk to another. ...
    (alt.os.linux)
  • Re: About relatime and nodiratime
    ... I am inquiring whether there may be any reason to fear loss of data due to ... systems, wirtes to disk are extremely frequent, and that relative would ... So I set up the ext3 partitions with relatime, ...
    (Ubuntu)
  • About relatime and nodiratime
    ... I am inquiring whether there may be any reason to fear loss of data due to ... systems, wirtes to disk are extremely frequent, and that relative would ... So I set up the ext3 partitions with relatime, ...
    (Ubuntu)
  • Re: linux hard drive failed, clicking on bootup
    ... I would go to the disk-drive manufacturer's web-site, ... The reason I suggested reading the manufacturer's advice ... past the end of the disk, ... I have certainly recovered data from disks that seemed to have died. ...
    (comp.os.linux.setup)