linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@sun.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: RFC, 32-bit compat handlers for EXT4_IOC_GROUP_ADD
Date: Fri, 05 Dec 2008 18:02:04 -0700	[thread overview]
Message-ID: <20081206010204.GY3186@webber.adilger.int> (raw)
In-Reply-To: <49385BC5.2070703@redhat.com>

On Dec 04, 2008  16:37 -0600, Eric Sandeen wrote:
> It's too bad this wasn't caught sooner, but I wonder if maybe it's still
> not too late; can we change the structure in the kernel and have newer
> e2fsprogs try both the old & new?  The new interface would add 32 bits
> of padding to the structure; this would leave it unchanged on 64-bit
> boxes so everything would continue to work.  Newer e2fsprogs would try
> both, so still work on older kernels.  32-bit compat would have a simple
> handler, *but* this *would* break resize of ext4 on native 32-bit
> machines with older e2fsprogs (the kernel would have a padded struct;
> older userspace would not, and the ioctl would fail).
> 
> How far out of "dev" are we?  I'm leaning towards saying "oh well, would
> have been nicer the other way" but going ahead and just putting the
> compat handler into the kernel.

I would be OK with changing to the "proper" struct layout.  Not being able
to resize with an older e2fsprogs + newer kernel isn't going to cause any
serious problems (unlike e.g. not being able to mount or e2fsck "/").

If we are seriously worried about compatibility, we could add the compat
handler for 32-bit kernels (should have a different IOC number anyways
because of the struct size) and add some arbitrary check like:

#ifdef LINUX_KERNEL_VERSION > KERNEL_VERSION(2,6,40)
#warning remove this old compat code
#endif

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.


  reply	other threads:[~2008-12-06  1:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-04 22:37 RFC, 32-bit compat handlers for EXT4_IOC_GROUP_ADD Eric Sandeen
2008-12-06  1:02 ` Andreas Dilger [this message]
2008-12-06 20:24   ` Theodore Tso
2008-12-08 16:31     ` Eric Sandeen

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=20081206010204.GY3186@webber.adilger.int \
    --to=adilger@sun.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.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).