All of lore.kernel.org
 help / color / mirror / Atom feed
* Ideas to do custom operation just after mount?
@ 2015-12-17  1:55 ` Qu Wenruo
  0 siblings, 0 replies; 12+ messages in thread
From: Qu Wenruo @ 2015-12-17  1:55 UTC (permalink / raw)
  To: fstests; +Cc: btrfs

Hi,

Will xfstests provides some API to do some operation just after
mounting a filesystem?

Some filesystem(OK, btrfs again) has some function(now qgroup only) 
which needed to be enabled by ioctl instead of mount option.

Currently, for btrfs qgroup we added special test case enabling qgroup 
and do test.
But there is only less than 10 qgroup test case and we didn't test most 
of the rest cases with qgroup enable.

Things will get even worse if we are adding inband-deduplication.

So is there any good idea to do some operation just after mounting in 
xfstests?

Thanks,
Qu



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Ideas to do custom operation just after mount?
@ 2015-12-17  1:55 ` Qu Wenruo
  0 siblings, 0 replies; 12+ messages in thread
From: Qu Wenruo @ 2015-12-17  1:55 UTC (permalink / raw)
  To: fstests; +Cc: btrfs

Hi,

Will xfstests provides some API to do some operation just after
mounting a filesystem?

Some filesystem(OK, btrfs again) has some function(now qgroup only) 
which needed to be enabled by ioctl instead of mount option.

Currently, for btrfs qgroup we added special test case enabling qgroup 
and do test.
But there is only less than 10 qgroup test case and we didn't test most 
of the rest cases with qgroup enable.

Things will get even worse if we are adding inband-deduplication.

So is there any good idea to do some operation just after mounting in 
xfstests?

Thanks,
Qu



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ideas to do custom operation just after mount?
  2015-12-17  1:55 ` Qu Wenruo
  (?)
@ 2015-12-21  0:16 ` Dave Chinner
  2015-12-21  2:25     ` Qu Wenruo
  -1 siblings, 1 reply; 12+ messages in thread
From: Dave Chinner @ 2015-12-21  0:16 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: fstests, btrfs

On Thu, Dec 17, 2015 at 09:55:14AM +0800, Qu Wenruo wrote:
> Hi,
> 
> Will xfstests provides some API to do some operation just after
> mounting a filesystem?
> 
> Some filesystem(OK, btrfs again) has some function(now qgroup only)
> which needed to be enabled by ioctl instead of mount option.

Irk.

Seriously, I need ot find some time to split all the fs specific
stuff in common/rc into separate files and have each different
filesystem implement it's own version of the relevant functions
like _scratch_mkfs, _scratch_mount, etc.

That will enable btrfs to do truly hideous stuff like this that
admins will hate you for requiring, and the rest of us won't have to
care about it.

> So is there any good idea to do some operation just after mounting
> in xfstests?

You're just going to have to wait a bit - the first piece of this
is in the overlayfs support patches, and the rest of it is in my
local work area in an incomplete state.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ideas to do custom operation just after mount?
  2015-12-21  0:16 ` Dave Chinner
@ 2015-12-21  2:25     ` Qu Wenruo
  0 siblings, 0 replies; 12+ messages in thread
From: Qu Wenruo @ 2015-12-21  2:25 UTC (permalink / raw)
  To: Dave Chinner; +Cc: fstests, btrfs



Dave Chinner wrote on 2015/12/21 11:16 +1100:
> On Thu, Dec 17, 2015 at 09:55:14AM +0800, Qu Wenruo wrote:
>> Hi,
>>
>> Will xfstests provides some API to do some operation just after
>> mounting a filesystem?
>>
>> Some filesystem(OK, btrfs again) has some function(now qgroup only)
>> which needed to be enabled by ioctl instead of mount option.
>
> Irk.
>
> Seriously, I need ot find some time to split all the fs specific
> stuff in common/rc into separate files and have each different
> filesystem implement it's own version of the relevant functions
> like _scratch_mkfs, _scratch_mount, etc.
>
> That will enable btrfs to do truly hideous stuff like this that
> admins will hate you for requiring, and the rest of us won't have to
> care about it.
>
>> So is there any good idea to do some operation just after mounting
>> in xfstests?
>
> You're just going to have to wait a bit - the first piece of this
> is in the overlayfs support patches, and the rest of it is in my
> local work area in an incomplete state.

Glad to hear that, I'll just wait for the formal implement.

Thanks,
Qu

>
> Cheers,
>
> Dave.
>



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ideas to do custom operation just after mount?
@ 2015-12-21  2:25     ` Qu Wenruo
  0 siblings, 0 replies; 12+ messages in thread
From: Qu Wenruo @ 2015-12-21  2:25 UTC (permalink / raw)
  To: Dave Chinner; +Cc: fstests, btrfs



Dave Chinner wrote on 2015/12/21 11:16 +1100:
> On Thu, Dec 17, 2015 at 09:55:14AM +0800, Qu Wenruo wrote:
>> Hi,
>>
>> Will xfstests provides some API to do some operation just after
>> mounting a filesystem?
>>
>> Some filesystem(OK, btrfs again) has some function(now qgroup only)
>> which needed to be enabled by ioctl instead of mount option.
>
> Irk.
>
> Seriously, I need ot find some time to split all the fs specific
> stuff in common/rc into separate files and have each different
> filesystem implement it's own version of the relevant functions
> like _scratch_mkfs, _scratch_mount, etc.
>
> That will enable btrfs to do truly hideous stuff like this that
> admins will hate you for requiring, and the rest of us won't have to
> care about it.
>
>> So is there any good idea to do some operation just after mounting
>> in xfstests?
>
> You're just going to have to wait a bit - the first piece of this
> is in the overlayfs support patches, and the rest of it is in my
> local work area in an incomplete state.

Glad to hear that, I'll just wait for the formal implement.

Thanks,
Qu

>
> Cheers,
>
> Dave.
>



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ideas to do custom operation just after mount?
  2015-12-21  2:25     ` Qu Wenruo
@ 2015-12-21  2:38       ` Qu Wenruo
  -1 siblings, 0 replies; 12+ messages in thread
From: Qu Wenruo @ 2015-12-21  2:38 UTC (permalink / raw)
  To: Dave Chinner; +Cc: fstests, btrfs



Qu Wenruo wrote on 2015/12/21 10:25 +0800:
>
>
> Dave Chinner wrote on 2015/12/21 11:16 +1100:
>> On Thu, Dec 17, 2015 at 09:55:14AM +0800, Qu Wenruo wrote:
>>> Hi,
>>>
>>> Will xfstests provides some API to do some operation just after
>>> mounting a filesystem?
>>>
>>> Some filesystem(OK, btrfs again) has some function(now qgroup only)
>>> which needed to be enabled by ioctl instead of mount option.
>>
>> Irk.
>>
>> Seriously, I need ot find some time to split all the fs specific
>> stuff in common/rc into separate files and have each different
>> filesystem implement it's own version of the relevant functions
>> like _scratch_mkfs, _scratch_mount, etc.
>>
>> That will enable btrfs to do truly hideous stuff like this that
>> admins will hate you for requiring, and the rest of us won't have to
>> care about it.

BTW, any good idea for btrfs to do such operation like 
enabling/disabling some minor features? Especially when it can be set on 
individual file/dirs.

Features like incoming write time deduplication, is designed to be 
enabled/disabled for individual file/dirs, so it's not a quite good idea 
to use mount option to do it.

Although some feature, like btrfs quota(qgroup), should be implemented 
by mount option though.
I don't understand why qgroup is enabled/disabled by ioctl. :(

Thanks,
Qu

>>
>>> So is there any good idea to do some operation just after mounting
>>> in xfstests?
>>
>> You're just going to have to wait a bit - the first piece of this
>> is in the overlayfs support patches, and the rest of it is in my
>> local work area in an incomplete state.
>
> Glad to hear that, I'll just wait for the formal implement.
>
> Thanks,
> Qu
>
>>
>> Cheers,
>>
>> Dave.
>>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ideas to do custom operation just after mount?
@ 2015-12-21  2:38       ` Qu Wenruo
  0 siblings, 0 replies; 12+ messages in thread
From: Qu Wenruo @ 2015-12-21  2:38 UTC (permalink / raw)
  To: Dave Chinner; +Cc: fstests, btrfs



Qu Wenruo wrote on 2015/12/21 10:25 +0800:
>
>
> Dave Chinner wrote on 2015/12/21 11:16 +1100:
>> On Thu, Dec 17, 2015 at 09:55:14AM +0800, Qu Wenruo wrote:
>>> Hi,
>>>
>>> Will xfstests provides some API to do some operation just after
>>> mounting a filesystem?
>>>
>>> Some filesystem(OK, btrfs again) has some function(now qgroup only)
>>> which needed to be enabled by ioctl instead of mount option.
>>
>> Irk.
>>
>> Seriously, I need ot find some time to split all the fs specific
>> stuff in common/rc into separate files and have each different
>> filesystem implement it's own version of the relevant functions
>> like _scratch_mkfs, _scratch_mount, etc.
>>
>> That will enable btrfs to do truly hideous stuff like this that
>> admins will hate you for requiring, and the rest of us won't have to
>> care about it.

BTW, any good idea for btrfs to do such operation like 
enabling/disabling some minor features? Especially when it can be set on 
individual file/dirs.

Features like incoming write time deduplication, is designed to be 
enabled/disabled for individual file/dirs, so it's not a quite good idea 
to use mount option to do it.

Although some feature, like btrfs quota(qgroup), should be implemented 
by mount option though.
I don't understand why qgroup is enabled/disabled by ioctl. :(

Thanks,
Qu

>>
>>> So is there any good idea to do some operation just after mounting
>>> in xfstests?
>>
>> You're just going to have to wait a bit - the first piece of this
>> is in the overlayfs support patches, and the rest of it is in my
>> local work area in an incomplete state.
>
> Glad to hear that, I'll just wait for the formal implement.
>
> Thanks,
> Qu
>
>>
>> Cheers,
>>
>> Dave.
>>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ideas to do custom operation just after mount?
  2015-12-21  2:38       ` Qu Wenruo
  (?)
@ 2015-12-21  5:18       ` Anand Jain
  2015-12-22  0:14           ` Kai Krakow
  2015-12-23 23:17         ` Dave Chinner
  -1 siblings, 2 replies; 12+ messages in thread
From: Anand Jain @ 2015-12-21  5:18 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: Dave Chinner, fstests, btrfs



> BTW, any good idea for btrfs to do such operation like
> enabling/disabling some minor features? Especially when it can be set on
> individual file/dirs.
>
> Features like incoming write time deduplication, is designed to be
> enabled/disabled for individual file/dirs, so it's not a quite good idea
> to use mount option to do it.
>
> Although some feature, like btrfs quota(qgroup), should be implemented
> by mount option though.
> I don't understand why qgroup is enabled/disabled by ioctl. :(


mount option won't persist across systems/computers unless remembered by 
human.


Thanks, Anand

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ideas to do custom operation just after mount?
  2015-12-21  5:18       ` Anand Jain
@ 2015-12-22  0:14           ` Kai Krakow
  2015-12-23 23:17         ` Dave Chinner
  1 sibling, 0 replies; 12+ messages in thread
From: Kai Krakow @ 2015-12-22  0:14 UTC (permalink / raw)
  To: linux-btrfs; +Cc: fstests

Am Mon, 21 Dec 2015 13:18:22 +0800
schrieb Anand Jain <anand.jain@oracle.com>:

> 
> 
> > BTW, any good idea for btrfs to do such operation like
> > enabling/disabling some minor features? Especially when it can be
> > set on individual file/dirs.
> >
> > Features like incoming write time deduplication, is designed to be
> > enabled/disabled for individual file/dirs, so it's not a quite good
> > idea to use mount option to do it.
> >
> > Although some feature, like btrfs quota(qgroup), should be
> > implemented by mount option though.
> > I don't understand why qgroup is enabled/disabled by ioctl. :(
> 
> 
> mount option won't persist across systems/computers unless remembered
> by human.

Valid point, tho here's an counter-example: space-cache is persisted.
Once enabled, it's always there until you clear AND disable it during
initial mount.

-- 
Regards,
Kai

Replies to list-only preferred.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ideas to do custom operation just after mount?
@ 2015-12-22  0:14           ` Kai Krakow
  0 siblings, 0 replies; 12+ messages in thread
From: Kai Krakow @ 2015-12-22  0:14 UTC (permalink / raw)
  To: fstests; +Cc: linux-btrfs

Am Mon, 21 Dec 2015 13:18:22 +0800
schrieb Anand Jain <anand.jain@oracle.com>:

> 
> 
> > BTW, any good idea for btrfs to do such operation like
> > enabling/disabling some minor features? Especially when it can be
> > set on individual file/dirs.
> >
> > Features like incoming write time deduplication, is designed to be
> > enabled/disabled for individual file/dirs, so it's not a quite good
> > idea to use mount option to do it.
> >
> > Although some feature, like btrfs quota(qgroup), should be
> > implemented by mount option though.
> > I don't understand why qgroup is enabled/disabled by ioctl. :(
> 
> 
> mount option won't persist across systems/computers unless remembered
> by human.

Valid point, tho here's an counter-example: space-cache is persisted.
Once enabled, it's always there until you clear AND disable it during
initial mount.

-- 
Regards,
Kai

Replies to list-only preferred.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ideas to do custom operation just after mount?
  2015-12-22  0:14           ` Kai Krakow
  (?)
@ 2015-12-22  9:28           ` Duncan
  -1 siblings, 0 replies; 12+ messages in thread
From: Duncan @ 2015-12-22  9:28 UTC (permalink / raw)
  To: linux-btrfs; +Cc: fstests

Kai Krakow posted on Tue, 22 Dec 2015 01:14:24 +0100 as excerpted:

> Am Mon, 21 Dec 2015 13:18:22 +0800 schrieb Anand Jain
> <anand.jain@oracle.com>:
> 
> 
>> 
>> > BTW, any good idea for btrfs to do such operation like
>> > enabling/disabling some minor features? Especially when it can be set
>> > on individual file/dirs.
>> >
>> > Features like incoming write time deduplication, is designed to be
>> > enabled/disabled for individual file/dirs, so it's not a quite good
>> > idea to use mount option to do it.
>> >
>> > Although some feature, like btrfs quota(qgroup), should be
>> > implemented by mount option though.
>> > I don't understand why qgroup is enabled/disabled by ioctl. :(
>> 
>> 
>> mount option won't persist across systems/computers unless remembered
>> by human.
> 
> Valid point, tho here's an counter-example: space-cache is persisted.
> Once enabled, it's always there until you clear AND disable it during
> initial mount.

Data point.  space_cache doesn't have to be manually enabled at all, 
unless it was turned off at some point; it's automatically enabled on 
mounting new btrfs.

At least, I've never specifically enabled (or disabled) space_cache on 
any of my btrfs here, yet they all have it enabled.

(Years ago, with my first btrfs experiments, a corrupted space_cache 
could cause the filesystem not to mount.  But then I left btrfs alone for 
awhile, and I guess in the mean time it learned to auto-correct such 
problems, as I've never had to worry about a bad space-cache failing a 
mount since I returned to using it, and that itself was two and a half 
years ago, now.  With the previous mount-blocker experience I was a 
rather nervous when I saw it enabled without me initially enabling it, 
but space_cache has basically "just worked" for me since then, tho I've 
had a few other mount-blocking bugs.)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Ideas to do custom operation just after mount?
  2015-12-21  5:18       ` Anand Jain
  2015-12-22  0:14           ` Kai Krakow
@ 2015-12-23 23:17         ` Dave Chinner
  1 sibling, 0 replies; 12+ messages in thread
From: Dave Chinner @ 2015-12-23 23:17 UTC (permalink / raw)
  To: Anand Jain; +Cc: Qu Wenruo, fstests, btrfs

On Mon, Dec 21, 2015 at 01:18:22PM +0800, Anand Jain wrote:
> 
> 
> >BTW, any good idea for btrfs to do such operation like
> >enabling/disabling some minor features? Especially when it can be set on
> >individual file/dirs.
> >
> >Features like incoming write time deduplication, is designed to be
> >enabled/disabled for individual file/dirs, so it's not a quite good idea
> >to use mount option to do it.
> >
> >Although some feature, like btrfs quota(qgroup), should be implemented
> >by mount option though.
> >I don't understand why qgroup is enabled/disabled by ioctl. :(
> 
> 
> mount option won't persist across systems/computers unless
> remembered by human.

So record the mount option you want persistent in the filesystem at
mount time and don't turn it off until a "no-...." mount option is
provided at mount time.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-12-23 23:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-17  1:55 Ideas to do custom operation just after mount? Qu Wenruo
2015-12-17  1:55 ` Qu Wenruo
2015-12-21  0:16 ` Dave Chinner
2015-12-21  2:25   ` Qu Wenruo
2015-12-21  2:25     ` Qu Wenruo
2015-12-21  2:38     ` Qu Wenruo
2015-12-21  2:38       ` Qu Wenruo
2015-12-21  5:18       ` Anand Jain
2015-12-22  0:14         ` Kai Krakow
2015-12-22  0:14           ` Kai Krakow
2015-12-22  9:28           ` Duncan
2015-12-23 23:17         ` Dave Chinner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.