common/rc: add filter in _test_inode_flag
PATCH v2 1/1 common/rc: add filter in _test_inode_flag
From: Xiaoli Feng <[email protected]>
Add _filter_scratch and _filter_test_dir to avoid _test_inode_flag failed when mount point contains flag string.
--- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/rc +1 -1
@@ -3112,7 +3112,7 @@ _test_inode_flag() local flag=$1 local file=$2 - if $XFS_IO_PROG -r -c 'lsattr -v' "$file" | grep -q "$flag" ; then + if $XFS_IO_PROG -r -c 'lsattr -v' "$file" | _filter_scratch | _filter_test_dir | grep -q "$flag" ; then return 0 fi return 1
Signature · 1 line
2.18.1
Quoted 13 lines · XiaoLi Feng
From: Xiaoli Feng <[email protected]>
Add
_filter_scratchand_filter_test_dirto avoid_test_inode_flagfailed when mount point contains flag string.--- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/rc +0
-0
common/rc _test_inode_flag() · line 3115
Quoted 5 lines
common/rc +1
-1@@ -3112,7 +3112,7 @@ _test_inode_flag() local flag=$1 local file=$2 - if $XFS_IO_PROG -r -c 'lsattr -v' "$file" | grep -q "$flag" ; then + if $XFS_IO_PROG -r -c 'lsattr -v' "$file" | _filter_scratch | _filter_test_dir | grep -q "$flag" ; then
Hi XiaoLi,
Is it ok to use _filter_testdir_and_scratch directly?
Best Regards,
Xiao Yang
Quoted 3 lines
common/rc +0
-0return 0 fi return 1
Hi,
----- Original Message -----
Quoted 24 lines
From: "Xiao Yang" <[email protected]>
To: "XiaoLi Feng" <[email protected]>
Cc: [email protected]
Sent: Thursday, February 18, 2021 2:30:38 PM
Subject: Re: [PATCH v2] common/rc: add filter in_test_inode_flagQuoted 17 lines · XiaoLi Feng
From: Xiaoli Feng <[email protected]>
Add
_filter_scratchand_filter_test_dirto avoid_test_inode_flagfailed when
mount point contains flag string.--- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/rc +0
-0@@ -3112,7 +3112,7 @@ _test_inode_flag() local flag=$1 local file=$2
Quoted 6 lines
Quoted 3 lines
common/rc +1
-1- if $XFS_IO_PROG -r -c 'lsattr -v' "$file" | grep -q "$flag" ; then + if $XFS_IO_PROG -r -c 'lsattr -v' "$file" | _filter_scratch |
_filter_test_dir| grep -q "$flag" ; thenHi XiaoLi,
Is it ok to use
_filter_testdir_and_scratchdirectly?
Yes, it's. _filter_testdir_and_scratch is better. Thanks for your reviewing.
Quoted 10 lines
Best Regards,
Xiao YangQuoted 3 lines
common/rc +0
-0return 0 fi return 1