From: Josef Bacik <josef@redhat.com>
To: Marco Stornelli <marco.stornelli@gmail.com>
Cc: Josef Bacik <josef@redhat.com>,
linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org,
viro@zeniv.linux.org.uk
Subject: Re: [PATCH] fs: make i_generation a u64
Date: Thu, 12 Apr 2012 09:56:30 -0400 [thread overview]
Message-ID: <20120412135629.GG1924@localhost.localdomain> (raw)
In-Reply-To: <CANGUGtBHNHE0=GQg-Hv1YUaYNhpt9F5-9qt+_UQ6fkCL__gxaQ@mail.gmail.com>
On Thu, Apr 12, 2012 at 08:46:14AM +0200, Marco Stornelli wrote:
> 2012/4/11 Josef Bacik <josef@redhat.com>:
> > Btrfs stores generation numbers as 64bit numbers, which means we ha=
ve to
> > carry around a u64 in our incore inode in addition to setting i_gen=
eration.
> > So convert to a u64 so btrfs can kill it's incore generation. =A0Th=
anks,
> >
> > Signed-off-by: Josef Bacik <josef@redhat.com>
> > ---
> > =A0include/linux/fs.h | =A0 =A02 +-
> > =A01 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/include/linux/fs.h b/include/linux/fs.h
> > index 9be896d..40564e0 100644
> > --- a/include/linux/fs.h
> > +++ b/include/linux/fs.h
> > @@ -831,7 +831,7 @@ struct inode {
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0struct cdev =A0 =A0 =A0 =A0 =A0 =A0 =
*i_cdev;
> > =A0 =A0 =A0 =A0};
> >
> > - =A0 =A0 =A0 __u32 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 i_generatio=
n;
> > + =A0 =A0 =A0 u64 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 i_generat=
ion;
> >
> > =A0#ifdef CONFIG_FSNOTIFY
> > =A0 =A0 =A0 =A0__u32 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 i_fsnotify=
_mask; /* all events this inode cares about */
> > --
> > 1.7.7.6
>=20
> This patch can have several impact on other fs. Only to do an example
> you can see the code in ioctl of ext4. I haven't got study the code
> but the ioctl returns a long, but on 32bit system, long means 4 bytes=
,
> so how we can return i_generation with ioctl?
So looking through everybody I'd have to convert a bunch of cpu_to_le32=
to
(u32)cpu_to_le64 and some other such crap which I'm not terribly intere=
sted in
doing, I don't care _that_ much about saving 8 bytes, so I'll just drop=
this for
now. Thanks,
Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Josef Bacik <josef@redhat.com>
To: Marco Stornelli <marco.stornelli@gmail.com>
Cc: Josef Bacik <josef@redhat.com>,
linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org,
viro@zeniv.linux.org.uk
Subject: Re: [PATCH] fs: make i_generation a u64
Date: Thu, 12 Apr 2012 09:56:30 -0400 [thread overview]
Message-ID: <20120412135629.GG1924@localhost.localdomain> (raw)
In-Reply-To: <CANGUGtBHNHE0=GQg-Hv1YUaYNhpt9F5-9qt+_UQ6fkCL__gxaQ@mail.gmail.com>
On Thu, Apr 12, 2012 at 08:46:14AM +0200, Marco Stornelli wrote:
> 2012/4/11 Josef Bacik <josef@redhat.com>:
> > Btrfs stores generation numbers as 64bit numbers, which means we have to
> > carry around a u64 in our incore inode in addition to setting i_generation.
> > So convert to a u64 so btrfs can kill it's incore generation. Thanks,
> >
> > Signed-off-by: Josef Bacik <josef@redhat.com>
> > ---
> > include/linux/fs.h | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/include/linux/fs.h b/include/linux/fs.h
> > index 9be896d..40564e0 100644
> > --- a/include/linux/fs.h
> > +++ b/include/linux/fs.h
> > @@ -831,7 +831,7 @@ struct inode {
> > struct cdev *i_cdev;
> > };
> >
> > - __u32 i_generation;
> > + u64 i_generation;
> >
> > #ifdef CONFIG_FSNOTIFY
> > __u32 i_fsnotify_mask; /* all events this inode cares about */
> > --
> > 1.7.7.6
>
> This patch can have several impact on other fs. Only to do an example
> you can see the code in ioctl of ext4. I haven't got study the code
> but the ioctl returns a long, but on 32bit system, long means 4 bytes,
> so how we can return i_generation with ioctl?
So looking through everybody I'd have to convert a bunch of cpu_to_le32 to
(u32)cpu_to_le64 and some other such crap which I'm not terribly interested in
doing, I don't care _that_ much about saving 8 bytes, so I'll just drop this for
now. Thanks,
Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-04-12 13:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-11 20:42 [PATCH] fs: make i_generation a u64 Josef Bacik
2012-04-12 0:32 ` Chris Mason
2012-04-12 6:46 ` Marco Stornelli
2012-04-12 6:46 ` Marco Stornelli
2012-04-12 13:20 ` Josef Bacik
2012-04-12 13:20 ` Josef Bacik
2012-04-12 13:56 ` Josef Bacik [this message]
2012-04-12 13:56 ` Josef Bacik
2012-04-12 19:42 ` Ted Ts'o
2012-04-12 19:49 ` Josef Bacik
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=20120412135629.GG1924@localhost.localdomain \
--to=josef@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=marco.stornelli@gmail.com \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.