From: Jaegeuk Kim <jaegeuk.kim@samsung.com>
To: Namjae Jeon <linkinjeon@gmail.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
Namjae Jeon <namjae.jeon@samsung.com>,
Amit Sahrawat <a.sahrawat@samsung.com>
Subject: Re: [PATCH] f2fs: add compat_ioctl to provide backward compatability
Date: Tue, 05 Feb 2013 16:12:56 +0900 [thread overview]
Message-ID: <1360048376.26950.34.camel@kjgkr> (raw)
In-Reply-To: <CAKYAXd8Qo44D8sNo8+r21fmV2ZQinSbqk8WmNiip+vgh9Wo6ow@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4330 bytes --]
2013-02-05 (화), 16:02 +0900, Namjae Jeon:
> 2013/2/5, Jaegeuk Kim <jaegeuk.kim@samsung.com>:
> > Hi,
> >
> > 2013-02-05 (화), 14:28 +0900, Namjae Jeon:
> >> Hi Jaegeuk.
> >>
> >> Oops!, I was missing include header.
> >> Sorry, I will send v2 patch again.
> >
> > I got a build error, and simply added the following header file in your
> > patch.
> >
> > #include <linux/compat.h>
> >
> > Is it correct?
> Yes, Right :) It should be needed.
> Sorry for my mistake again. Could you add this header instead of me
> ?(because I can resend the patch tonight....).
No problem. I've already done it. :)
Thanks,
>
> Thanks!
> >
> > Thanks,
> >
> >>
> >> Thanks.
> >>
> >> 2013/2/4, Namjae Jeon <linkinjeon@gmail.com>:
> >> > From: Namjae Jeon <namjae.jeon@samsung.com>
> >> >
> >> > adding compat_ioctl to provide support for backward comptability -
> >> > 32bit
> >> > binary
> >> > execution on 64bit kernel.
> >> >
> >> > Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
> >> > Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
> >> > ---
> >> > fs/f2fs/f2fs.h | 15 +++++++++++++++
> >> > fs/f2fs/file.c | 20 ++++++++++++++++++++
> >> > 2 files changed, 35 insertions(+)
> >> >
> >> > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> >> > index 58dd608..7bf86c8 100644
> >> > --- a/fs/f2fs/f2fs.h
> >> > +++ b/fs/f2fs/f2fs.h
> >> > @@ -104,6 +104,20 @@ static inline int update_sits_in_cursum(struct
> >> > f2fs_summary_block *rs, int i)
> >> > }
> >> >
> >> > /*
> >> > + * ioctl commands
> >> > + */
> >> > +#define F2FS_IOC_GETFLAGS FS_IOC_GETFLAGS
> >> > +#define F2FS_IOC_SETFLAGS FS_IOC_SETFLAGS
> >> > +
> >> > +#if defined(__KERNEL__) && defined(CONFIG_COMPAT)
> >> > +/*
> >> > + * ioctl commands in 32 bit emulation
> >> > + */
> >> > +#define F2FS_IOC32_GETFLAGS FS_IOC32_GETFLAGS
> >> > +#define F2FS_IOC32_SETFLAGS FS_IOC32_SETFLAGS
> >> > +#endif
> >> > +
> >> > +/*
> >> > * For INODE and NODE manager
> >> > */
> >> > #define XATTR_NODE_OFFSET (-1) /*
> >> > @@ -850,6 +864,7 @@ void f2fs_truncate(struct inode *);
> >> > int f2fs_setattr(struct dentry *, struct iattr *);
> >> > int truncate_hole(struct inode *, pgoff_t, pgoff_t);
> >> > long f2fs_ioctl(struct file *, unsigned int, unsigned long);
> >> > +long f2fs_compat_ioctl(struct file *, unsigned int, unsigned long);
> >> >
> >> > /*
> >> > * inode.c
> >> > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> >> > index 633667e..e79d26a 100644
> >> > --- a/fs/f2fs/file.c
> >> > +++ b/fs/f2fs/file.c
> >> > @@ -644,6 +644,23 @@ out:
> >> > }
> >> > }
> >> >
> >> > +#ifdef CONFIG_COMPAT
> >> > +long f2fs_compat_ioctl(struct file *file, unsigned int cmd, unsigned
> >> > long
> >> > arg)
> >> > +{
> >> > + switch (cmd) {
> >> > + case F2FS_IOC32_GETFLAGS:
> >> > + cmd = F2FS_IOC_GETFLAGS;
> >> > + break;
> >> > + case F2FS_IOC32_SETFLAGS:
> >> > + cmd = F2FS_IOC_SETFLAGS;
> >> > + break;
> >> > + default:
> >> > + return -ENOIOCTLCMD;
> >> > + }
> >> > + return f2fs_ioctl(file, cmd, (unsigned long) compat_ptr(arg));
> >> > +}
> >> > +#endif
> >> > +
> >> > const struct file_operations f2fs_file_operations = {
> >> > .llseek = generic_file_llseek,
> >> > .read = do_sync_read,
> >> > @@ -655,6 +672,9 @@ const struct file_operations f2fs_file_operations =
> >> > {
> >> > .fsync = f2fs_sync_file,
> >> > .fallocate = f2fs_fallocate,
> >> > .unlocked_ioctl = f2fs_ioctl,
> >> > +#ifdef CONFIG_COMPAT
> >> > + .compat_ioctl = f2fs_compat_ioctl,
> >> > +#endif
> >> > .splice_read = generic_file_splice_read,
> >> > .splice_write = generic_file_splice_write,
> >> > };
> >> > --
> >> > 1.7.9.5
> >> >
> >> >
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel"
> >> in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
> > --
> > Jaegeuk Kim
> > Samsung
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Jaegeuk Kim
Samsung
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2013-02-05 7:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-04 14:41 [PATCH] f2fs: add compat_ioctl to provide backward compatability Namjae Jeon
2013-02-05 5:28 ` Namjae Jeon
2013-02-05 6:45 ` Jaegeuk Kim
2013-02-05 7:02 ` Namjae Jeon
2013-02-05 7:12 ` Namjae Jeon
2013-02-05 7:12 ` Jaegeuk Kim [this message]
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=1360048376.26950.34.camel@kjgkr \
--to=jaegeuk.kim@samsung.com \
--cc=a.sahrawat@samsung.com \
--cc=linkinjeon@gmail.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namjae.jeon@samsung.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