From 6c6c1d63c243025956f061e67fff3a615aa0f6be Mon Sep 17 00:00:00 2001 From: David Howells Date: Thu, 25 Apr 2019 14:26:52 +0100 Subject: afs: Provide mount-time configurable byte-range file locking emulation Provide byte-range file locking emulation that can be configured at mount time to one of four modes: (1) flock=local. Locking is done locally only and no reference is made to the server. (2) flock=openafs. Byte-range locking is done locally only; whole-file locking is done with reference to the server. Whole-file locks cannot be upgraded unless the client holds an exclusive lock. (3) flock=strict. Byte-range and whole-file locking both require a sufficient whole-file lock on the server. (4) flock=write. As strict, but the client always gets an exclusive whole-file lock on the server. Signed-off-by: David Howells --- include/trace/events/afs.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'include/trace') diff --git a/include/trace/events/afs.h b/include/trace/events/afs.h index e81d6a50781f..f1373c29bf7d 100644 --- a/include/trace/events/afs.h +++ b/include/trace/events/afs.h @@ -539,6 +539,41 @@ TRACE_EVENT(afs_make_fs_call, __print_symbolic(__entry->op, afs_fs_operations)) ); +TRACE_EVENT(afs_make_fs_calli, + TP_PROTO(struct afs_call *call, const struct afs_fid *fid, + unsigned int i), + + TP_ARGS(call, fid, i), + + TP_STRUCT__entry( + __field(unsigned int, call ) + __field(unsigned int, i ) + __field(enum afs_fs_operation, op ) + __field_struct(struct afs_fid, fid ) + ), + + TP_fast_assign( + __entry->call = call->debug_id; + __entry->i = i; + __entry->op = call->operation_ID; + if (fid) { + __entry->fid = *fid; + } else { + __entry->fid.vid = 0; + __entry->fid.vnode = 0; + __entry->fid.unique = 0; + } + ), + + TP_printk("c=%08x %06llx:%06llx:%06x %s i=%u", + __entry->call, + __entry->fid.vid, + __entry->fid.vnode, + __entry->fid.unique, + __print_symbolic(__entry->op, afs_fs_operations), + __entry->i) + ); + TRACE_EVENT(afs_make_fs_call1, TP_PROTO(struct afs_call *call, const struct afs_fid *fid, const char *name), -- cgit