diskfs / go-diskfs

MIT License
501 stars 112 forks source link

add rdrw open disk mode #177

Closed ekodian closed 1 year ago

ekodian commented 1 year ago

Add RDWR mode for diskfs.Open(...), so partitions could be resized without exclusive write access. For example growpart uses sgdisk to resize partitions on running systems.

deitch commented 1 year ago

Isn't that dangerous? When the kernel opens a disk, it almost always opens it exclusive, does it not?

ekodian commented 1 year ago

Yes, but you can do it and for example cloud-int does this thing on start, using growpart to extend disk. I think - how you open disk is solely a user's responsibility.

deitch commented 1 year ago

solely a user's responsibility

Which is the argument I have made over and over again with other projects, and here I am arguing against it. Hoisted on my own petard. Good point!