]> git.proxmox.com Git - mirror_zfs-debian.git/blobdiff - include/sys/zfs_rlock.h
Imported Upstream version 0.6.5.3
[mirror_zfs-debian.git] / include / sys / zfs_rlock.h
index da18b1f18efc435ee0f80112a8d19a3922837cf8..ea5e4036929197bd4cda21046700c5ad387d2492 100644 (file)
@@ -26,8 +26,6 @@
 #ifndef        _SYS_FS_ZFS_RLOCK_H
 #define        _SYS_FS_ZFS_RLOCK_H
 
-
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -58,16 +56,14 @@ typedef struct rl {
 } rl_t;
 
 /*
- * Lock a range (offset, length) as either shared (READER)
- * or exclusive (WRITER or APPEND). APPEND is a special type that
- * is converted to WRITER that specified to lock from the start of the
- * end of file.  zfs_range_lock() returns the range lock structure.
+ * Lock a range (offset, length) as either shared (RL_READER)
+ * or exclusive (RL_WRITER or RL_APPEND).  RL_APPEND is a special type that
+ * is converted to RL_WRITER that specified to lock from the start of the
+ * end of file.  Returns the range lock structure.
  */
 rl_t *zfs_range_lock(znode_t *zp, uint64_t off, uint64_t len, rl_type_t type);
 
-/*
- * Unlock range and destroy range lock structure.
- */
+/* Unlock range and destroy range lock structure. */
 void zfs_range_unlock(rl_t *rl);
 
 /*
@@ -77,7 +73,8 @@ void zfs_range_unlock(rl_t *rl);
 void zfs_range_reduce(rl_t *rl, uint64_t off, uint64_t len);
 
 /*
- * AVL comparison function used to compare range locks
+ * AVL comparison function used to order range locks
+ * Locks are ordered on the start offset of the range.
  */
 int zfs_range_compare(const void *arg1, const void *arg2);