Skip to contentSkip to conversation

f2fs: add compat_ioctl to f2fs_dir_operations

PATCH In review hujianyang 2 participants 2 messages May 12, 2015 F2FS file system

lore
Share & tools
lore

hujianyang

author
#0 lore raw

PATCH 1/1 f2fs: add compat_ioctl to f2fs_dir_operations

commit e9750824114ff939d9da299e73651add6aa65456

f2fs: add compat_ioctl to provide backward compatability

introduce compat_ioctl to regular files, but doesn't add this functionality to f2fs_dir_operations.

While running a 32-bit busybox, I met an error like this:
(A is a directory)

# busybox chattr +i A
chattr: reading flags on A: Inappropriate ioctl for device

This patch copies compat_ioctl from f2fs_file_operations and fix this problem.

---
 fs/f2fs/dir.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
fs/f2fs/dir.c +3 -0
index 12f6869..3e92376 100644
@@ -879,4 +879,7 @@ const struct file_operations f2fs_dir_operations = {
 	.iterate	= f2fs_readdir,
 	.fsync		= f2fs_sync_file,
 	.unlocked_ioctl	= f2fs_ioctl,
+#ifdef CONFIG_COMPAT
+	.compat_ioctl   = f2fs_compat_ioctl,
+#endif
 };
Signature · 10 lines
1.6.0.2



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
Reviewed-by on v1 1/1
#1 lore raw

Hi Jianyang,

Quoted 14 lines

-----Original Message-----
From: hujianyang [mailto:[email protected]]
Sent: Tuesday, May 12, 2015 4:06 PM
To: Jaegeuk Kim
Cc: Chao Yu; [email protected]; [email protected]
Subject: [f2fs-dev][PATCH] f2fs: add compat_ioctl to f2fs_dir_operations

commit e9750824114ff939d9da299e73651add6aa65456

f2fs: add compat_ioctl to provide backward compatability

introduce compat_ioctl to regular files, but doesn't add this functionality to f2fs_dir_operations.

Quoted 8 lines

While running a 32-bit busybox, I met an error like this:
(A is a directory)

# busybox chattr +i A
chattr: reading flags on A: Inappropriate ioctl for device

This patch copies compat_ioctl from f2fs_file_operations and fix this problem.

Looks good to me.

Quoted 2 lines

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y