lkml.org 
[lkml]   [1999]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: partition table rereading
jj writes:

: In fact, BLKRRPART could be improved: currently you get EBUSY if some
: partitions of the disk are used. But if the partitions which are busy
: have not changed at all (and kept the same number), then I think there
: is no reason not to succeed. It will require some additional code
: (checking if the busy partitions have the same start/length in kernel
: tables and in the new partition table), but IMHO is worth doing that.

I am not so sure this is very useful in practice -
think it would help only in a few cases.

The code for checking whether a reread can be done without harm
will be messy (with the danger of races). Probably it is better
to do this from user space. With routines
add_partition(int devfd, int start, int length, char *name, int flags)
del_partition_by_start(int devfd, int start, int flags)
del_partition_by_name(int devfd, char *name, int flags)
with devfd referring to the entire disk,
we need not check all possible uses of the disk, but add_partition()
needs only check that there is no overlap with any existing partition,
and del_partition() needs only check that this partition exists and
is not in use.

This looks clean and powerful: able to cope with foreign
partition table types and disks without any partition table.

Andries

-
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:51    [W:0.043 / U:1.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site