From: Ryusuke Konishi Subject: Re: [PATCH 29/35] Btrfs ioctl code Date: Sat, 17 Jan 2009 13:16:24 +0900 (JST) Message-ID: <20090117.131624.56008149.ryusuke@osrg.net> References: <20090116.032900.03617624.ryusuke@osrg.net> <1232126583.21473.47.camel@think.oraclecorp.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: torvalds@linux-foundation.org, konishi.ryusuke@lab.ntt.co.jp, akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org To: chris.mason@oracle.com Return-path: Received: from sh.osrg.net ([192.16.179.4]:33932 "EHLO sh.osrg.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752530AbZAQERH (ORCPT ); Fri, 16 Jan 2009 23:17:07 -0500 In-Reply-To: <1232126583.21473.47.camel@think.oraclecorp.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, 16 Jan 2009 12:23:03 -0500, Chris Mason wrote: > On Thu, 2009-01-15 at 12:17 -0800, Linus Torvalds wrote: > > > > On Fri, 16 Jan 2009, Ryusuke Konishi wrote: > > > > > Hi Chris, > > > On Wed, 7 Jan 2009 22:57:19 -0500, Chris Mason wrote: > > > > + > > > > +struct btrfs_ioctl_vol_args { > > > > + __s64 fd; > > > > + char name[BTRFS_PATH_NAME_MAX + 1]; > > > > +}; > > > > > > The size of btrfs_ioctl_vol_args seems to depend on architectures. > > > > > > For example, the size was 3084 bytes on a x86-32 machine, but was 3088 > > > bytes on a x86-64 machine. > > > > Grr. Different alignment for 64-bit values, coupled with "name" not > > having a size that is a multiple-of-eight. > > > > Chris, I think we want to fix this. Even if it breaks binary > > compatibility with previous tools. I don't think we want to have compat > > ioctls for something that is so close to already working. > > I've fixed both the kernel and the progs to use a 4k struct, and tested > all the btrfs_ioctl_var_arg ioctls on x86-64 with a program compiled on > x86-32. > > Ryusuke, thank you very much for finding this now. You're welcome. I'm glad to return the favor. Ryusuke