linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Phillip Susi <psusi@ubuntu.com>
Cc: linux-kernel@vger.kernel.org, axboe@kernel.dk,
	dm-devel@redhat.com, Karel Zak <kzak@redhat.com>,
	maxim.patlasov@gmail.com
Subject: Re: [PATCH 0/2] block: online resize of disk partitions
Date: Mon, 13 Feb 2012 17:24:54 -0500	[thread overview]
Message-ID: <20120213222454.GF3130@redhat.com> (raw)
In-Reply-To: <4F398C39.6010901@ubuntu.com>

On Mon, Feb 13, 2012 at 05:18:33PM -0500, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 2/13/2012 4:50 PM, Vivek Goyal wrote:
> > So if a user anyway does not specify the start of sector, then 
> > tools shall have to first read it and then call the ioctl. If 
> > anyway tools are specifying, there is no much scope of screwing up 
> > the things?
> 
> Tools certainly should know where the partition starts.  I already
> have patched parted and partx to pass the current size, which they
> had trivially available.  Making sure of that is a good sanity check
> to guard against, for instance, resizing the wrong partition.

Ok, so user still specifies just the new size of partition and tool
passes in both the "start" and new "size" to the ioctl?

> 
> > Even if we allow changing start at some point of time, then IOCTL 
> > can remain the same and just the implementation will change in a 
> > backward compatible manner. Old tools still will continue to work 
> > as they have always been, and new ones can start passing "start" 
> > too.
> > 
> > So I really did not find passing and checking "start" of partition
> >  very appealing.
> 
> That is exactly why passing and checking start is required.  If it is
> entirely ignored, then the interface can not start using it in the
> future in a backward compatible way, because user mode tools will have
> grown used to passing in any kind of garbage, so if the kernel starts
> using it to alter the start position of the partition, older tools
> would randomly and accidentally be shifting the the start of
> partitions they just mean to change the length of.

Ok, I think keeping the ioctl backward compatible in light of any
future changes makes sense. I will change the patches to not ignore
the partition "start" and repost.

Thanks for the comments.

Vivek

  reply	other threads:[~2012-02-13 22:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-13 19:30 [PATCH 0/2] block: online resize of disk partitions Vivek Goyal
2012-02-13 19:30 ` [PATCH 1/2] block: add partition resize function to blkpg ioctl Vivek Goyal
2012-02-13 19:30 ` [PATCH 2/2] resizepart: Utility to resize a partition Vivek Goyal
2012-02-13 21:34 ` [PATCH 0/2] block: online resize of disk partitions Phillip Susi
2012-02-13 21:50   ` Vivek Goyal
2012-02-13 21:56     ` Vivek Goyal
2012-02-13 22:18     ` Phillip Susi
2012-02-13 22:24       ` Vivek Goyal [this message]
2012-02-14  1:24         ` Phillip Susi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120213222454.GF3130@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=kzak@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxim.patlasov@gmail.com \
    --cc=psusi@ubuntu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).