Record the file, line, and pid of the last successful shared lock holder. This
is useful as a last effort in debugging file system deadlocks. This is enabled via 'options DEBUG_LOCKS'
This commit is contained in:
parent
12b32eafa8
commit
7181624aaa
@ -259,6 +259,12 @@ debuglockmgr(lkp, flags, interlkp, td, name, file, line)
|
||||
if (error)
|
||||
break;
|
||||
sharelock(lkp, 1);
|
||||
#if defined(DEBUG_LOCKS)
|
||||
lkp->lk_slockholder = pid;
|
||||
lkp->lk_sfilename = file;
|
||||
lkp->lk_slineno = line;
|
||||
lkp->lk_slockername = name;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
/*
|
||||
|
@ -62,6 +62,11 @@ struct lock {
|
||||
const char *lk_filename;
|
||||
const char *lk_lockername;
|
||||
int lk_lineno;
|
||||
|
||||
pid_t lk_slockholder;
|
||||
const char *lk_sfilename;
|
||||
const char *lk_slockername;
|
||||
int lk_slineno;
|
||||
#endif
|
||||
};
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user