diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 15:11:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 15:11:57 -0400 |
commit | 300df7dc89cc276377fc020704e34875d5c473b6 (patch) | |
tree | 6b280000815b0562255cecf3da1a8c9597bce702 /fs/ocfs2/cluster | |
parent | 661adc423d70203a56723701aaf255e16950dfdb (diff) | |
parent | 9af0b38ff3f4f79c62dd909405b113bf7c1a23aa (diff) |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
ocfs2/net: Use wait_event() in o2net_send_message_vec()
ocfs2: Adjust rightmost path in ocfs2_add_branch.
ocfs2: fdatasync should skip unimportant metadata writeout
ocfs2: Remove redundant gotos in ocfs2_mount_volume()
ocfs2: Add statistics for the checksum and ecc operations.
ocfs2 patch to track delayed orphan scan timer statistics
ocfs2: timer to queue scan of all orphan slots
ocfs2: Correct ordering of ip_alloc_sem and localloc locks for directories
ocfs2: Fix possible deadlock in quota recovery
ocfs2: Fix possible deadlock with quotas in ocfs2_setattr()
ocfs2: Fix lock inversion in ocfs2_local_read_info()
ocfs2: Fix possible deadlock in ocfs2_global_read_dquot()
ocfs2: update comments in masklog.h
ocfs2: Don't printk the error when listing too many xattrs.
Diffstat (limited to 'fs/ocfs2/cluster')
-rw-r--r-- | fs/ocfs2/cluster/masklog.h | 35 | ||||
-rw-r--r-- | fs/ocfs2/cluster/tcp.c | 7 |
2 files changed, 19 insertions, 23 deletions
diff --git a/fs/ocfs2/cluster/masklog.h b/fs/ocfs2/cluster/masklog.h index 7e72a81bc2d4..696c32e50716 100644 --- a/fs/ocfs2/cluster/masklog.h +++ b/fs/ocfs2/cluster/masklog.h | |||
@@ -48,34 +48,33 @@ | |||
48 | * only emit the appropriage printk() when the caller passes in a constant | 48 | * only emit the appropriage printk() when the caller passes in a constant |
49 | * mask, as is almost always the case. | 49 | * mask, as is almost always the case. |
50 | * | 50 | * |
51 | * All this bitmask nonsense is hidden from the /proc interface so that Joel | 51 | * All this bitmask nonsense is managed from the files under |
52 | * doesn't have an aneurism. Reading the file gives a straight forward | 52 | * /sys/fs/o2cb/logmask/. Reading the files gives a straightforward |
53 | * indication of which bits are on or off: | 53 | * indication of which bits are allowed (allow) or denied (off/deny). |
54 | * ENTRY off | 54 | * ENTRY deny |
55 | * EXIT off | 55 | * EXIT deny |
56 | * TCP off | 56 | * TCP off |
57 | * MSG off | 57 | * MSG off |
58 | * SOCKET off | 58 | * SOCKET off |
59 | * ERROR off | 59 | * ERROR allow |
60 | * NOTICE on | 60 | * NOTICE allow |
61 | * | 61 | * |
62 | * Writing changes the state of a given bit and requires a strictly formatted | 62 | * Writing changes the state of a given bit and requires a strictly formatted |
63 | * single write() call: | 63 | * single write() call: |
64 | * | 64 | * |
65 | * write(fd, "ENTRY on", 8); | 65 | * write(fd, "allow", 5); |
66 | * | 66 | * |
67 | * would turn the entry bit on. "1" is also accepted in the place of "on", and | 67 | * Echoing allow/deny/off string into the logmask files can flip the bits |
68 | * "off" and "0" behave as expected. | 68 | * on or off as expected; here is the bash script for example: |
69 | * | 69 | * |
70 | * Some trivial shell can flip all the bits on or off: | 70 | * log_mask="/sys/fs/o2cb/log_mask" |
71 | * for node in ENTRY EXIT TCP MSG SOCKET ERROR NOTICE; do | ||
72 | * echo allow >"$log_mask"/"$node" | ||
73 | * done | ||
71 | * | 74 | * |
72 | * log_mask="/proc/fs/ocfs2_nodemanager/log_mask" | 75 | * The debugfs.ocfs2 tool can also flip the bits with the -l option: |
73 | * cat $log_mask | ( | 76 | * |
74 | * while read bit status; do | 77 | * debugfs.ocfs2 -l TCP allow |
75 | * # $1 is "on" or "off", say | ||
76 | * echo "$bit $1" > $log_mask | ||
77 | * done | ||
78 | * ) | ||
79 | */ | 78 | */ |
80 | 79 | ||
81 | /* for task_struct */ | 80 | /* for task_struct */ |
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 9fbe849f6344..334f231a422c 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c | |||
@@ -974,7 +974,7 @@ static int o2net_tx_can_proceed(struct o2net_node *nn, | |||
974 | int o2net_send_message_vec(u32 msg_type, u32 key, struct kvec *caller_vec, | 974 | int o2net_send_message_vec(u32 msg_type, u32 key, struct kvec *caller_vec, |
975 | size_t caller_veclen, u8 target_node, int *status) | 975 | size_t caller_veclen, u8 target_node, int *status) |
976 | { | 976 | { |
977 | int ret, error = 0; | 977 | int ret; |
978 | struct o2net_msg *msg = NULL; | 978 | struct o2net_msg *msg = NULL; |
979 | size_t veclen, caller_bytes = 0; | 979 | size_t veclen, caller_bytes = 0; |
980 | struct kvec *vec = NULL; | 980 | struct kvec *vec = NULL; |
@@ -1015,10 +1015,7 @@ int o2net_send_message_vec(u32 msg_type, u32 key, struct kvec *caller_vec, | |||
1015 | 1015 | ||
1016 | o2net_set_nst_sock_time(&nst); | 1016 | o2net_set_nst_sock_time(&nst); |
1017 | 1017 | ||
1018 | ret = wait_event_interruptible(nn->nn_sc_wq, | 1018 | wait_event(nn->nn_sc_wq, o2net_tx_can_proceed(nn, &sc, &ret)); |
1019 | o2net_tx_can_proceed(nn, &sc, &error)); | ||
1020 | if (!ret && error) | ||
1021 | ret = error; | ||
1022 | if (ret) | 1019 | if (ret) |
1023 | goto out; | 1020 | goto out; |
1024 | 1021 | ||