Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dummy znode from zvol_state #4510

Closed
wants to merge 3 commits into from
Closed

Remove dummy znode from zvol_state #4510

wants to merge 3 commits into from

Commits on May 13, 2016

  1. 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.
    
    Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
    Chunwei Chen committed May 13, 2016
    Configuration menu
    Copy the full SHA
    5cfacbc View commit details
    Browse the repository at this point in the history
  2. Use zfs range locks in ztest

    bprotopopov authored and Chunwei Chen committed May 13, 2016
    Configuration menu
    Copy the full SHA
    573bf88 View commit details
    Browse the repository at this point in the history
  3. Export zfs_rlock symbols for users like lustre

    Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
    Chunwei Chen committed May 13, 2016
    Configuration menu
    Copy the full SHA
    7a46269 View commit details
    Browse the repository at this point in the history