Skip to contentSkip to conversation

Make lttctl mount debugfs automatically

PATCH Mathieu Desnoyers 3 participants 6 messages Jan 9, 2009 – Jan 15, 2009 5 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): AA3F776E5F6246859F1978B7C7CF1919@zhaoleiwin

A message that is not in the archive (sent off-list or not yet received): 20090108144430.GA3778@Krystal

A message that is not in the archive (sent off-list or not yet received): 7C0A417AB5B84CDCB9A9484C4E13A08C@zhaoleiwin

#5 lore raw
Quoted 34 lines · * Zhaolei ([email protected]) wrote:

* From: "Mathieu Desnoyers" <[email protected]>

Quoted 13 lines · * Zhaolei ([email protected]) wrote:
Quoted 12 lines

* From: "Pierre-Marc Fournier" <[email protected]>

Quoted 9 lines
Quoted 3 lines · Zhaolei

lttctl need debugfs mounted,
This patch make lttctl mount debugfs automatically when it is not mounted.

Isn't having a utility such as lttctl mount filesystems against standard unix semantics? Can you give an example of another standard command that uses a filesystem and that tries to mount it if it isn't already mounted?

Hello, Pierre-Marc,

Quoted 7 lines
Quoted 3 lines

I can give a an example.
It is SystemTap.

No offence, but can you find an example which is not explicitly described as "bad taste" example by many people in the Linux kernel community ?

Hello, Mathieu

I can't find another example of mounting debugfs automatically. Maybe it is because debugfs is not widely used as others such as sysfs and procfs.

sysfs and procfs are mounted in boot, and user-mode tools need not check and mount then again. But debugfs is not too useful for normal user who just use linux to edit text and browse internet, so mount debugfs in boot period is not a good idea.
So, IMHO, debugfs's usage is not same as sysfs and procfs, we need not mount sysfs and procfs in user-mode program, but maybe it is different for debugfs.

Quoted 5 lines

On the other hand, I also understand your opinion, mount a fs in program looks strange(but can make user easy to use...), so you can feel free to ignore this patch.
Same with [PATCH 2/2] Make lttctl load ltt-trace-control module automatically.

I wonder what's Greg KH (and others) opinion about this ?

Mathieu

Quoted 34 lines

Regards
Zhaolei

Quoted 15 lines

Mathieu

Quoted 12 lines

Regards
Zhaolei

Quoted 9 lines

My guess is we should warn about the filesystem not being mounted, but not try to call mount() directly.

Quoted 4 lines

Little cleanup also done(combile 2 getdebugfsmntdir() into one).

Applies on top of ltt-control-0.63-03012009.

Quoted 11 lines
Quoted 5 lines

_______________________________________________
ltt-dev mailing list
[email protected]
http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev

Signature · 2 lines
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

_______________________________________________
ltt-dev mailing list
[email protected]
http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev

Signature · 2 lines
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
#6 lore raw
Quoted 19 lines · Mathieu Desnoyers
Quoted 18 lines · * Zhaolei ([email protected]) wrote:

* From: "Mathieu Desnoyers" <[email protected]>

Quoted 17 lines · * Zhaolei ([email protected]) wrote:
Quoted 15 lines

* From: "Pierre-Marc Fournier" <[email protected]>

Quoted 9 lines
Quoted 3 lines · Zhaolei

lttctl need debugfs mounted,
This patch make lttctl mount debugfs automatically when it is not mounted.

Isn't having a utility such as lttctl mount filesystems against standard unix semantics? Can you give an example of another standard command that uses a filesystem and that tries to mount it if it isn't already mounted?

Hello, Pierre-Marc,

I can give a an example.
It is SystemTap.

Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

No offence, but can you find an example which is not explicitly described as "bad taste" example by many people in the Linux kernel community ?

Hello, Mathieu

I can't find another example of mounting debugfs automatically.

Have you looked? openSUSE mounts it automatically, and I think Fedora also does so.

thanks,

greg k-h

#7 lore raw
Quoted 23 lines · Greg KH
Quoted 22 lines · Mathieu Desnoyers
Quoted 21 lines · * Zhaolei ([email protected]) wrote:

* From: "Mathieu Desnoyers" <[email protected]>

Quoted 20 lines · * Zhaolei ([email protected]) wrote:
Quoted 6 lines

* From: "Pierre-Marc Fournier" <[email protected]>

Quoted 5 lines
Quoted 3 lines · Zhaolei

lttctl need debugfs mounted,
This patch make lttctl mount debugfs automatically when it is not mounted.

Quoted 9 lines
Quoted 4 lines

Isn't having a utility such as lttctl mount filesystems against standard unix semantics? Can you give an example of another standard command that uses a filesystem and that tries to mount it if it isn't already mounted?

Hello, Pierre-Marc,

I can give a an example.
It is SystemTap.

No offence, but can you find an example which is not explicitly described as "bad taste" example by many people in the Linux kernel community ?

Quoted 6 lines
Quoted 3 lines
Quoted 3 lines

Hello, Mathieu

I can't find another example of mounting debugfs automatically.

Have you looked? openSUSE mounts it automatically, and I think Fedora also does so.

Fedora doesn't. At least not with the last 3 stable releases.

josh

#8 lore raw
In reply to Greg KH
Quoted 23 lines · * Greg KH ([email protected]) wrote:
Quoted 22 lines · Mathieu Desnoyers
Quoted 21 lines · * Zhaolei ([email protected]) wrote:

* From: "Mathieu Desnoyers" <[email protected]>

Quoted 20 lines · * Zhaolei ([email protected]) wrote:
Quoted 6 lines

* From: "Pierre-Marc Fournier" <[email protected]>

Quoted 5 lines
Quoted 3 lines · Zhaolei

lttctl need debugfs mounted,
This patch make lttctl mount debugfs automatically when it is not mounted.

Quoted 9 lines
Quoted 4 lines

Isn't having a utility such as lttctl mount filesystems against standard unix semantics? Can you give an example of another standard command that uses a filesystem and that tries to mount it if it isn't already mounted?

Hello, Pierre-Marc,

I can give a an example.
It is SystemTap.

No offence, but can you find an example which is not explicitly described as "bad taste" example by many people in the Linux kernel community ?

Quoted 7 lines
Quoted 3 lines
Quoted 3 lines

Hello, Mathieu

I can't find another example of mounting debugfs automatically.

Have you looked? openSUSE mounts it automatically, and I think Fedora also does so.

It makes sense for a whole distribution to mount debugfs automatically, but is it OK for a single userspace application to have this kind of behavior ?

Mathieu

Quoted 4 lines

thanks,

greg k-h

Signature · 2 lines
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
#9 lore raw
Quoted 28 lines · Mathieu Desnoyers
Quoted 27 lines · * Greg KH ([email protected]) wrote:
Quoted 25 lines · Mathieu Desnoyers
Quoted 24 lines · * Zhaolei ([email protected]) wrote:

* From: "Mathieu Desnoyers" <[email protected]>

Quoted 13 lines · * Zhaolei ([email protected]) wrote:
Quoted 12 lines

* From: "Pierre-Marc Fournier" <[email protected]>

Quoted 9 lines
Quoted 3 lines · Zhaolei

lttctl need debugfs mounted,
This patch make lttctl mount debugfs automatically when it is not mounted.

Isn't having a utility such as lttctl mount filesystems against standard unix semantics? Can you give an example of another standard command that uses a filesystem and that tries to mount it if it isn't already mounted?

Hello, Pierre-Marc,

Quoted 7 lines
Quoted 3 lines

I can give a an example.
It is SystemTap.

No offence, but can you find an example which is not explicitly described as "bad taste" example by many people in the Linux kernel community ?

Hello, Mathieu

I can't find another example of mounting debugfs automatically.

Quoted 7 lines
Quoted 3 lines

Have you looked? openSUSE mounts it automatically, and I think Fedora also does so.

It makes sense for a whole distribution to mount debugfs automatically, but is it OK for a single userspace application to have this kind of behavior ?

If it's a "debug" application, why not?

thanks,

greg k-h

#10 lore raw
Quoted 33 lines · * Greg KH ([email protected]) wrote:
Quoted 32 lines · Mathieu Desnoyers
Quoted 30 lines · * Greg KH ([email protected]) wrote:
Quoted 19 lines · Mathieu Desnoyers
Quoted 18 lines · * Zhaolei ([email protected]) wrote:

* From: "Mathieu Desnoyers" <[email protected]>

Quoted 17 lines · * Zhaolei ([email protected]) wrote:
Quoted 15 lines

* From: "Pierre-Marc Fournier" <[email protected]>

Quoted 9 lines
Quoted 3 lines · Zhaolei

lttctl need debugfs mounted,
This patch make lttctl mount debugfs automatically when it is not mounted.

Isn't having a utility such as lttctl mount filesystems against standard unix semantics? Can you give an example of another standard command that uses a filesystem and that tries to mount it if it isn't already mounted?

Hello, Pierre-Marc,

I can give a an example.
It is SystemTap.

Quoted 6 lines
Quoted 6 lines
Quoted 3 lines

No offence, but can you find an example which is not explicitly described as "bad taste" example by many people in the Linux kernel community ?

Hello, Mathieu

I can't find another example of mounting debugfs automatically.

Have you looked? openSUSE mounts it automatically, and I think Fedora also does so.

Quoted 6 lines
Quoted 3 lines

It makes sense for a whole distribution to mount debugfs automatically, but is it OK for a single userspace application to have this kind of behavior ?

If it's a "debug" application, why not?

Yep, I'll merge his patch in ltt-control then. Thanks for the feedback.

Mathieu

Quoted 4 lines

thanks,

greg k-h

Signature · 2 lines
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68