[PATCH] ceph: return error on fsc mount option on kernel without support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If the kernel was built without fscache support, then we should have it
return an error when someone attempts to mount with -o fsc. Also, prefix
the similar message with POSIX ACL support with "ceph:" to make it clear
which driver doesn't have that support.

Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
---
 fs/ceph/super.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index d68d6aad6d57..cdd3073acbac 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -373,6 +373,7 @@ static int ceph_parse_param(struct fs_context *fc, struct fs_parameter *param)
 		break;
 
 	case Opt_fscache:
+#ifdef CONFIG_CEPH_FSCACHE
 		kfree(fsopt->fscache_uniq);
 		fsopt->fscache_uniq = NULL;
 		if (result.negated) {
@@ -383,6 +384,9 @@ static int ceph_parse_param(struct fs_context *fc, struct fs_parameter *param)
 			param->string = NULL;
 		}
 		break;
+#else
+		return invalf(fc, "ceph: fscache support is disabled");
+#endif
 
 	case Opt_poolperm:
 		if (!result.negated)
@@ -413,7 +417,7 @@ static int ceph_parse_param(struct fs_context *fc, struct fs_parameter *param)
 #ifdef CONFIG_CEPH_FS_POSIX_ACL
 			fc->sb_flags |= SB_POSIXACL;
 #else
-			return invalf(fc, "POSIX ACL support is disabled");
+			return invalf(fc, "ceph: POSIX ACL support is disabled");
 #endif
 		} else {
 			fc->sb_flags &= ~SB_POSIXACL;
-- 
2.23.0




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux