Print this page
3741 zfs needs better comments
Submitted by:   Will Andrews <willa@spectralogic.com>
Submitted by:   Justin Gibbs <justing@spectralogic.com>
Submitted by:   Alan Somers <alans@spectralogic.com>
Reviewed by:    Matthew Ahrens <mahrens@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libzfs/common/libzfs_dataset.c
          +++ new/usr/src/lib/libzfs/common/libzfs_dataset.c
↓ open down ↓ 4420 lines elided ↑ open up ↑
4421 4421                          break;
4422 4422                  default:
4423 4423                          err = zfs_standard_error_fmt(hdl, errno, errbuf);
4424 4424                          break;
4425 4425                  }
4426 4426          }
4427 4427  
4428 4428          return (err);
4429 4429  }
4430 4430  
     4431 +/*
     4432 + * Convert the zvol's volume size to an appropriate reservation.
     4433 + * Note: If this routine is updated, it is necessary to update the ZFS test
     4434 + * suite's shell version in reservation.kshlib.
     4435 + */
4431 4436  uint64_t
4432 4437  zvol_volsize_to_reservation(uint64_t volsize, nvlist_t *props)
4433 4438  {
4434 4439          uint64_t numdb;
4435 4440          uint64_t nblocks, volblocksize;
4436 4441          int ncopies;
4437 4442          char *strval;
4438 4443  
4439 4444          if (nvlist_lookup_string(props,
4440 4445              zfs_prop_to_name(ZFS_PROP_COPIES), &strval) == 0)
↓ open down ↓ 27 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX