diff mbox

UBIFS: Add freeze support in ubifs

Message ID 1443321561-20581-1-git-send-email-yangds.fnst@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Yang Dongsheng Sept. 27, 2015, 2:39 a.m. UTC
We need to do nothing in ubifs, as all is already done in vfs.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
---
 fs/ubifs/super.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Richard Weinberger Sept. 27, 2015, 8:06 a.m. UTC | #1
Yang,

Am 27.09.2015 um 04:39 schrieb Dongsheng Yang:
> We need to do nothing in ubifs, as all is already done in vfs.

Please more details. :-)
The current changelog reads like every filesystem should implement
it as nop. Which is obviously not the case.

fs/super.c checks whether ->freeze_fs() is implemented, so
a nop-implementation does not make sense here.

I bet you hit this in fs/ioctl.c:
        /* If filesystem doesn't support freeze feature, return. */
        if (sb->s_op->freeze_fs == NULL && sb->s_op->freeze_super == NULL)
                return -EOPNOTSUPP;

Correct?

And the most important detail is missing, why is UBIFS allowed
to have a nop-implementation?

Thanks,
//richard
--
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
Yang Dongsheng Sept. 28, 2015, 3:10 a.m. UTC | #2
On 09/27/2015 04:06 PM, Richard Weinberger wrote:
> Yang,
>
> Am 27.09.2015 um 04:39 schrieb Dongsheng Yang:
>> We need to do nothing in ubifs, as all is already done in vfs.
>
> Please more details. :-)

Oh, this patch is really an incorrect one. At least I have to add
sb_start/end_intwrite and sb_start/end_pagefault in ubifs at
first. And I have to add more details about what I am doing and
why. Will send v2 later.

I think I was out of my mind yesterday, this patch is really not ready
to go in my local box. :(

Sorry for the noisy.

Yang
> The current changelog reads like every filesystem should implement
> it as nop. Which is obviously not the case.
>
> fs/super.c checks whether ->freeze_fs() is implemented, so
> a nop-implementation does not make sense here.
>
> I bet you hit this in fs/ioctl.c:
>          /* If filesystem doesn't support freeze feature, return. */
>          if (sb->s_op->freeze_fs == NULL && sb->s_op->freeze_super == NULL)
>                  return -EOPNOTSUPP;
>
> Correct?
>
> And the most important detail is missing, why is UBIFS allowed
> to have a nop-implementation?
>
> Thanks,
> //richard
> .
>

--
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
diff mbox

Patch

diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 9547a278..e8f85b5 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1871,6 +1871,11 @@  static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)
 	return 0;
 }
 
+static int ubifs_freeze_fs(struct super_block *sb)
+{
+	return 0;
+}
+
 const struct super_operations ubifs_super_operations = {
 	.alloc_inode   = ubifs_alloc_inode,
 	.destroy_inode = ubifs_destroy_inode,
@@ -1882,6 +1887,7 @@  const struct super_operations ubifs_super_operations = {
 	.remount_fs    = ubifs_remount_fs,
 	.show_options  = ubifs_show_options,
 	.sync_fs       = ubifs_sync_fs,
+	.freeze_fs     = ubifs_freeze_fs,
 };
 
 /**