diff options
author | Chunwei Chen <[email protected]> | 2016-04-11 14:53:48 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-05-17 10:29:02 -0700 |
commit | d88895a069765bc3c6119ac1a3c8ea9edec7a370 (patch) | |
tree | 4124ee3bfcf5d5ecb3f7c5e84cc95824a063faf7 /lib/libzpool/Makefile.am | |
parent | 61a3d06f8414ae1eb8b278be8776a6b30b351549 (diff) |
Remove dummy znode from zvol_state
struct zvol_state contains a dummy znode, which is around 1KB on x64,
only for zfs_range_lock. But in reality, other than z_range_lock and
z_range_avl, zfs_range_lock only need znode on regular file, which
means we add 1KB on a structure and gain nothing.
In this patch, we remove the dummy znode for zvol_state. In order to
do that, we also need to refactor zfs_range_lock a bit. We move
z_range_lock and z_range_avl pair out of znode_t to form zfs_rlock_t.
This new struct replaces znode_t as the main handle inside the range
lock functions.
We also add pointers to z_size, z_blksz, and z_max_blksz so range lock
code doesn't depend on znode_t. This allows non-ZPL consumers like
Lustre to use the range locks with their equivalent znode_t structure.
Signed-off-by: Chunwei Chen <[email protected]>
Signed-off-by: Boris Protopopov <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #4510
Diffstat (limited to 'lib/libzpool/Makefile.am')
0 files changed, 0 insertions, 0 deletions