subclass and name_version of lockdep
by laurent01_ from LinuxQuestions.org on (#5D3TM)
I'm new to lockdep and there is something which I cannot understand exactly. I want to figure out subclass and name_version. It seems that since lockdep use name_version to track the each instance of the lock class. And subclass represents for nested lock.
Then Here my questions comes.
There are two SSD each /dev/sda /dev/sdb and each SSD has two partitions so /dev/sda1 /dev/sda2 /dev/sdb1 /dev/sdb2 Then for each disk and partition, how the lock name is determined? I think that /dev/sda -> lock#1 /dev/sda1-> lock#1/1 /dev/sda2 -> lock#?/1 How the /dev/sda2's lock name is determined? It seems that the order of lock_acquire() might influence the name_version but let assume /dev/sda1's lock is pre-acquired than /dev/sda2's one.
Is there anyone who can clarify the each lock's name for possible case?


Then Here my questions comes.
There are two SSD each /dev/sda /dev/sdb and each SSD has two partitions so /dev/sda1 /dev/sda2 /dev/sdb1 /dev/sdb2 Then for each disk and partition, how the lock name is determined? I think that /dev/sda -> lock#1 /dev/sda1-> lock#1/1 /dev/sda2 -> lock#?/1 How the /dev/sda2's lock name is determined? It seems that the order of lock_acquire() might influence the name_version but let assume /dev/sda1's lock is pre-acquired than /dev/sda2's one.
Is there anyone who can clarify the each lock's name for possible case?