lkml.org 
[lkml]   [1999]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: RFC: from FIBMAP to FIONDEV
On Fri, Jun 11, 1999 at 10:48:29AM +0200, Werner Almesberger wrote:
> #define FIONDEV_UNSTABLE 2 /* location is temporary (e.g. scratch file,

I think FIONDEV_VOLATILE would be a better name here.

> FIONDEV_COPIES
> Data is contained in multiple areas, e.g. replicated on several
> volumes in a RAID array. A boot loader may use this information,
> but by doing so, it may not preserve all of the semantics of the
> storage. (E.g. in the case of a RAID, the RAID storage itself may
> survive the failure of some disks, but a boot loader may fail if
> the disks it mapped are among the ones that failed.)
>
> If there are multiple locations at which the physically same data
> block can be found, FIONDEV_COPIES should only be set if none of
> them can be relied to remain valid. Otherwise, the most long-lived
> location should be returned.

I wonder if this is good enough. What do you think to the idea of having
an index passed to the routine (initially set to zero) which could be
incremented to find all copies of this block? This takes care of RAID-1
and RAID 0+1.

To go even further, support for RAID-[2345] could be added, but this
would be much more complex. Let's see..

call FIONDEV with index 0
returns FIONDEV_COPIES and the real block
call FIONDEV with index 1
returns FIONDEV_COPIES | FIONDEV_XOR and one of the blocks to combine
call FIONDEV with index 2
returns FIONDEV_COPIES | FIONDEV_XOR and the next block to combine
[...]
call FIONDEV with index n
returns FIONDEV_ERROR to indicate there's no more blocks.

This scheme has no way of saying `you can get block A either by reading
this block here, or by reading this pair of blocks and XORing them, or
by reading this set of other blocks over here and XORing them', but I
don't think such a system exists. (and I think we could add another flag
to cope with that, if one did).

--
Matthew Wilcox <willy@bofh.ai>
"Windows and MacOS are products, contrived by engineers in the service of
specific companies. Unix, by contrast, is not so much a product as it is a
painstakingly compiled oral history of the hacker subculture." - N Stephenson

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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