Chunwei Chen d88895a069 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 <david.chen@osnexus.com>
Signed-off-by: Boris Protopopov <boris.protopopov@actifio.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4510
2016-05-17 10:29:02 -07:00
..
2015-09-11 11:14:38 -07:00
2015-07-10 11:58:37 -07:00
2014-08-01 14:28:05 -07:00
2016-01-08 15:08:19 -08:00
2014-01-07 10:33:11 -08:00
2014-08-01 14:28:05 -07:00
2014-03-04 12:22:24 -08:00
2016-05-02 14:27:45 -07:00
2014-07-29 10:55:29 -07:00
2014-07-29 10:55:29 -07:00
2013-11-04 11:18:14 -08:00
2013-11-04 11:17:48 -08:00
2016-04-21 09:49:25 -07:00
2016-01-15 15:38:35 -08:00
2014-08-13 10:35:00 -07:00
2016-04-21 09:49:25 -07:00
2014-07-30 09:20:35 -07:00
2015-12-30 13:20:12 -08:00
2016-05-02 14:27:45 -07:00
2016-05-17 10:29:02 -07:00
2016-01-15 15:38:35 -08:00
2016-01-15 15:38:35 -08:00
2016-01-15 15:38:35 -08:00
2015-01-06 16:53:24 -08:00
2011-02-10 09:21:43 -08:00
2013-11-04 10:55:25 -08:00
2013-12-18 16:46:35 -08:00
2015-06-25 08:58:16 -07:00
2011-03-02 11:43:50 -08:00
2015-12-04 09:39:20 -08:00
2014-07-28 14:29:58 -07:00
2013-11-04 10:55:25 -08:00
2015-09-04 16:08:14 -07:00
2013-12-18 16:46:35 -08:00
2011-02-10 09:27:21 -08:00
2016-05-17 10:29:02 -07:00
2016-01-15 15:33:45 -08:00
2016-04-21 09:49:25 -07:00
2016-05-17 10:29:02 -07:00
2015-06-09 13:48:02 -07:00
2016-01-08 15:08:19 -08:00
2013-11-04 10:55:25 -08:00
2013-11-05 12:14:56 -08:00
2015-09-03 14:14:55 -07:00