Re: [PATCH v6 1/6] fstests: common: Introduce _post_mount_hook for btrfs

2016-09-18 Thread Qu Wenruo



At 09/15/2016 12:24 PM, Dave Chinner wrote:

On Wed, Sep 14, 2016 at 09:55:22AM +0800, Qu Wenruo wrote:

Introduce _post_mount_hook(), which will be executed after mounting
scratch/test.

It's quite useful for fs(OK, only btrfs yet, again) which needs to
use ioctl other than mount option to enable some of its feature.


Just implement a _btrfs_mount() function (similar to
_overlay_mount()) to do btrfs specific things at mount time.

Signed-off-by: Qu Wenruo 
---
 common/rc | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/common/rc b/common/rc
index 23c007a..631397f 100644
--- a/common/rc
+++ b/common/rc
@@ -321,6 +321,27 @@ _overlay_scratch_unmount()
$UMOUNT_PROG $SCRATCH_MNT
 }

+_run_btrfs_post_mount_hook()
+{
+   mnt_point=$1
+   for n in $ALWAYS_ENABLE_BTRFS_FEATURE; do


What's this magic, undefined, undocumented variable?


Yes this reminds me.

The biggest problem is, where is the document of all these variables?

common/config and config/examples all lacks variables like 
TIME_FACTOR/LOAD_FACTOR.


Or it's the time to doc them all?

Thanks,
Qu


Cheers,

Dave.




--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v6 1/6] fstests: common: Introduce _post_mount_hook for btrfs

2016-09-14 Thread Dave Chinner
On Wed, Sep 14, 2016 at 09:55:22AM +0800, Qu Wenruo wrote:
> Introduce _post_mount_hook(), which will be executed after mounting
> scratch/test.
> 
> It's quite useful for fs(OK, only btrfs yet, again) which needs to
> use ioctl other than mount option to enable some of its feature.

Just implement a _btrfs_mount() function (similar to
_overlay_mount()) to do btrfs specific things at mount time.
> Signed-off-by: Qu Wenruo 
> ---
>  common/rc | 23 +++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/common/rc b/common/rc
> index 23c007a..631397f 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -321,6 +321,27 @@ _overlay_scratch_unmount()
>   $UMOUNT_PROG $SCRATCH_MNT
>  }
>  
> +_run_btrfs_post_mount_hook()
> +{
> + mnt_point=$1
> + for n in $ALWAYS_ENABLE_BTRFS_FEATURE; do

What's this magic, undefined, undocumented variable?

Cheers,

Dave.
-- 
Dave Chinner
da...@fromorbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html