ocfs2: update comments in masklog.h
In the mainline ocfs2 code, the interface for masklog is in files under /sys/fs/o2cb/masklog, but the comments in fs/ocfs2/cluster/masklog.h reference the old /proc interface. They are out of date. This patch modifies the comments in cluster/masklog.h, which also provides a bash script example on how to change the log mask bits. Signed-off-by: Coly Li <coly.li@suse.de> Signed-off-by: Joel Becker <joel.becker@oracle.com>
This commit is contained in:
Родитель
a46fa684fc
Коммит
2b53bc7bff
|
@ -48,34 +48,33 @@
|
||||||
* only emit the appropriage printk() when the caller passes in a constant
|
* only emit the appropriage printk() when the caller passes in a constant
|
||||||
* mask, as is almost always the case.
|
* mask, as is almost always the case.
|
||||||
*
|
*
|
||||||
* All this bitmask nonsense is hidden from the /proc interface so that Joel
|
* All this bitmask nonsense is managed from the files under
|
||||||
* doesn't have an aneurism. Reading the file gives a straight forward
|
* /sys/fs/o2cb/logmask/. Reading the files gives a straightforward
|
||||||
* indication of which bits are on or off:
|
* indication of which bits are allowed (allow) or denied (off/deny).
|
||||||
* ENTRY off
|
* ENTRY deny
|
||||||
* EXIT off
|
* EXIT deny
|
||||||
* TCP off
|
* TCP off
|
||||||
* MSG off
|
* MSG off
|
||||||
* SOCKET off
|
* SOCKET off
|
||||||
* ERROR off
|
* ERROR allow
|
||||||
* NOTICE on
|
* NOTICE allow
|
||||||
*
|
*
|
||||||
* Writing changes the state of a given bit and requires a strictly formatted
|
* Writing changes the state of a given bit and requires a strictly formatted
|
||||||
* single write() call:
|
* single write() call:
|
||||||
*
|
*
|
||||||
* write(fd, "ENTRY on", 8);
|
* write(fd, "allow", 5);
|
||||||
*
|
*
|
||||||
* would turn the entry bit on. "1" is also accepted in the place of "on", and
|
* Echoing allow/deny/off string into the logmask files can flip the bits
|
||||||
* "off" and "0" behave as expected.
|
* on or off as expected; here is the bash script for example:
|
||||||
*
|
*
|
||||||
* Some trivial shell can flip all the bits on or off:
|
* log_mask="/sys/fs/o2cb/log_mask"
|
||||||
*
|
* for node in ENTRY EXIT TCP MSG SOCKET ERROR NOTICE; do
|
||||||
* log_mask="/proc/fs/ocfs2_nodemanager/log_mask"
|
* echo allow >"$log_mask"/"$node"
|
||||||
* cat $log_mask | (
|
|
||||||
* while read bit status; do
|
|
||||||
* # $1 is "on" or "off", say
|
|
||||||
* echo "$bit $1" > $log_mask
|
|
||||||
* done
|
* done
|
||||||
* )
|
*
|
||||||
|
* The debugfs.ocfs2 tool can also flip the bits with the -l option:
|
||||||
|
*
|
||||||
|
* debugfs.ocfs2 -l TCP allow
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* for task_struct */
|
/* for task_struct */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче