[lkml]   [2011]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/2] Add partition resize function to BLKPG ioctl
On Thu, Dec 08, 2011 at 10:25:26AM -0500, Phillip Susi wrote:
> On 12/8/2011 10:16 AM, Karel Zak wrote:
> > Is it safe to alter the partition size in arbitrary way if the
> > partition is used by any process?
> >
> > Vivek's BLKPG_EXTEND_PARTITIONV seems more safety, because it extends
> > a partition size only, so all offsets in all running stuff are still
> > valid.
> >
> > Maybe you need to check bdevp->bd_openers and returns -EBUSY if you
> > want to alter the begin of the partition.
> I disallowed altering the start of the partition ( that would just
> be crazy ), but altering the end has been supported on lvm for years
> now. Ext4 can not perform an online shrink, but btrfs can, and I was
> able to successfully have btrfs shrink the fs and then use
> BLKPG_RES_PARTITION to shrink the partition.

So, if there is an IO in flight while partition shrinking is happening,
then IO can end up happening outside the partition?

part->nr_sects can be 64 bits on 32bit machines and update will be
non-atomic. I had used sequence counter to make sure read is able
to get to intermediate value. May be it is a good idea to address
this concenrn.


 \ /
  Last update: 2011-12-08 17:01    [W:0.086 / U:3.816 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site