About struct blockgroup_lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

     Recently I was reading some code about filesystems, and I found
the usage of struct blockgroup_lock is confusing. I have 3 questions
about it, and please help give me some instuctions on them.

http://lxr.linux.no/#linux+v2.6.32/include/linux/blockgroup_lock.h

1)  What is the relationship between NR_CPUS and NR_BG_LOCKS ?
2)  And how to understand the usage of struct blockgroup_lock?
3)  What is the relationship between block_group and NR_BG_LOCKS, e.g.
in blk_lock_ptr?

  56static inline spinlock_t *
  57bgl_lock_ptr(struct blockgroup_lock *bgl, unsigned int block_group)
  58{
  59        return &bgl->locks[(block_group) & (NR_BG_LOCKS-1)].lock;
  60}


thanks,
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux