xfs
[Top] [All Lists]

Re: [RFC PATCH 1/3] Implement generic freeze feature

To: "Andreas Dilger" <adilger@xxxxxxx>
Subject: Re: [RFC PATCH 1/3] Implement generic freeze feature
From: "Takashi Sato" <t-sato@xxxxxxxxxxxxx>
Date: Wed, 21 May 2008 10:23:23 +0900
Cc: <linux-ext4@xxxxxxxxxxxxxxx>, <xfs@xxxxxxxxxxx>, <dm-devel@xxxxxxxxxx>, <linux-fsdevel@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>
In-reply-to: <20080520035712.GA7252@xxxxxxxxxxxxxxxxxx>
References: <20080514170625t-sato@xxxxxxxxxxxxxxx> <20080520035712.GA7252@xxxxxxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
Hi,

Andreas Dilger wrote:
+static int ioctl_freeze(struct file *filp)
+{
+    struct super_block *sb = filp->f_path.dentry->d_inode->i_sb;
+
+    if (!capable(CAP_SYS_ADMIN))
+        return -EPERM;
+
+    /* If filesystem doesn't support freeze feature, return. */
+    if (sb->s_op->write_super_lockfs == NULL)
+        return -EINVAL;

Should this be EINVAL, or EOPNOTSUPP?  Usually EINVAL means there is
something wrong with the passed ioctl parameters (e.g. bad value),
while EOPNOTSUPP is "operation not supported" and makes more sense.

Sounds good.
I will send new patch-set which is rebased to 2.6.26-rc3 and includes
this fix, in this weekend.

Cheers, Takashi


<Prev in Thread] Current Thread [Next in Thread>