summaryrefslogtreecommitdiff
path: root/common/attr
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2014-04-28 10:55:12 +1000
committerDave Chinner <david@fromorbit.com>2014-04-28 10:55:12 +1000
commita841a6d0a88232861e7b8e9bc2dcc009afbf0476 (patch)
tree99811c69b7ac414607eaf2b66586696f8567b636 /common/attr
parenta12a56fb24c26e4abe0e95106e3282e8162f6e25 (diff)
generic: introduce new large ACL test
Having just removed the largeacl test from the shared ACL test, reintroduce the same test as an generic test so that we can handle the different limits in supported ACL count appropriately across different filesystems and different configurations within filesystem types. Filesystems have to add support to _acl_get_max to run this test - the default behaviour right now is to throw a notrun error like this: generic/026 14s ... [not run] ext4 does not define maximum ACL count Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'common/attr')
-rw-r--r--common/attr31
1 files changed, 31 insertions, 0 deletions
diff --git a/common/attr b/common/attr
index 83bf9d14..6fdcbf2b 100644
--- a/common/attr
+++ b/common/attr
@@ -21,6 +21,37 @@
#-----------------------------------------------------------------------
# common extended attribute and ACL support
+# filesystems that want to test maximum supported acl counts need to
+# add support in here
+_acl_get_max()
+{
+ case $FSTYP in
+ xfs)
+ # CRC format filesystems have much larger ACL counts. The actual
+ # number is into the thousands, but testing that meany takes too
+ # long, so just test well past the old limit of 25.
+ xfs_info $TEST_DIR | _filter_mkfs > /dev/null 2> $tmp.info
+ . $tmp.info
+ rm $tmp.info
+ if [ $_fs_has_crcs -eq 0 ]; then
+ echo 25
+ else
+ echo 5461
+ fi
+ ;;
+ *)
+ echo 0
+ ;;
+ esac
+}
+
+_require_acl_get_max()
+{
+ if [ $(_acl_get_max) -eq 0 ]; then
+ _notrun "$FSTYP does not define maximum ACL count"
+ fi
+}
+
# pick three unused user/group ids, store them as $acl[1-3]
#
_acl_setup_ids()