It happened to me several times already. If you have large disk and your
root partition on it and want to repartition the rest, you'd otherwise have
to reboot...
>
> 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.
I completely agree with this. Probably some ioctl (e.g. BLKRR1PART) with
some structure describing what to do.
If I find some time for it, I'll try to code something and come with it back
to you.
Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
UltraLinux | http://ultra.linux.cz/ | http://ultra.penguin.cz/
Linux version 2.2.5 on a sparc64 machine (3958.37 BogoMips)
___________________________________________________________________
-
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/