Mhm I see.*/
unsigned long t_log_start;
- /* Number of buffers on the t_buffers list [j_list_lock] */
+ /* Number of buffers on the t_buffers list [j_list_lock, no lock for quick racy checks] */
int t_nr_buffers;
So this case is actually somewhat different now that I audited the uses.
There are two types of users - commit code (fs/jbd2/commit.c) and others.
Other users properly use j_list_lock to access t_nr_buffers. Commit code
does not use any locks because committing transaction is fully in
ownership of the jbd2 thread and all other users need to check & wait for
commit to be finished before doing anything with the transaction's buffers.
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature