From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Subject: Re: dm: introduce DM_GET_TARGET_VERSION Date: Tue, 17 Sep 2019 16:08:28 -0400 Message-ID: <20190917200827.GA5042@redhat.com> References: <20190916180107.GA725@infradead.org> <127b8c4e-a6dc-6d5e-caff-fe1a0ca3a5bb@gmail.com> <20190917140632.GA3728@redhat.com> Reply-To: LVM2 development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: lvm-devel-bounces@redhat.com Errors-To: lvm-devel-bounces@redhat.com To: John Dorminy Cc: lvm-devel@redhat.com, Christoph Hellwig , device-mapper development , Zdenek Kabelac , Milan Broz List-Id: dm-devel.ids On Tue, Sep 17 2019 at 11:44am -0400, John Dorminy wrote: > Makes sense, sorry I missed that detail. > > Might it be better to just extend 'dmsetup targets' to take an optional > target-name parameter? When I saw this change, I thought 'dmsetup targets > ' surely worked already for the purpose, and was somewhat surprised > when experiment disagreed. Then list_versions() has much the same code > change as in this change, there's a little change in validate_params(), > and it seems less surprising (to me) to extend the existing > target-information-printing dmsetup command than to add another one. No, I don't think it better to extend 'dmsetup targets'. There is little to be gained in doing so. The DM_GET_TARGET_VERSION ioctl's implementation happens to be shared with the DM_LIST_VERSIONS ioctl (used by 'dmsetup targets') but that doesn't imply DM_LIST_VERSIONS should be extended instead. This is a simple change that enables userspace to accomplish a specific goal without altering an established DM ioctl. -- lvm-devel mailing list lvm-devel@redhat.com https://www.redhat.com/mailman/listinfo/lvm-devel From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Date: Tue, 17 Sep 2019 16:08:28 -0400 Subject: dm: introduce DM_GET_TARGET_VERSION In-Reply-To: References: <20190916180107.GA725@infradead.org> <127b8c4e-a6dc-6d5e-caff-fe1a0ca3a5bb@gmail.com> <20190917140632.GA3728@redhat.com> Message-ID: <20190917200827.GA5042@redhat.com> List-Id: To: lvm-devel@redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Tue, Sep 17 2019 at 11:44am -0400, John Dorminy wrote: > Makes sense, sorry I missed that detail. > > Might it be better to just extend 'dmsetup targets' to take an optional > target-name parameter? When I saw this change, I thought 'dmsetup targets > ' surely worked already for the purpose, and was somewhat surprised > when experiment disagreed. Then list_versions() has much the same code > change as in this change, there's a little change in validate_params(), > and it seems less surprising (to me) to extend the existing > target-information-printing dmsetup command than to add another one. No, I don't think it better to extend 'dmsetup targets'. There is little to be gained in doing so. The DM_GET_TARGET_VERSION ioctl's implementation happens to be shared with the DM_LIST_VERSIONS ioctl (used by 'dmsetup targets') but that doesn't imply DM_LIST_VERSIONS should be extended instead. This is a simple change that enables userspace to accomplish a specific goal without altering an established DM ioctl.