A single common interface provides the mechanism that is used to
alter the physical reference counts of blocks on the NASD drive.
That interface, nasd_odc_ref_ranges()
, is defined as:
in_exle
, which is a NULL
-terminated singly-linked
list (on the next
field) of extents. All blocks must be in
the same partition (partnum
), or must all be partitionless
(for example, inode hash table blocks). The reference counts will be adjusted
by adding delta
(which may be negative).
If the reference count on a block becomes zero, that block will be
released by calling an appropriate layout release function- either
nasd_od_layout_release_oneblock()
or
nasd_od_layout_release_blocks
. The layout_handle
passed as the final argument to nasd_odc_ref_ranges()
will
in turn be passed as the final argument to these layout functions. The
only callers of nasd_odc_ref_ranges()
that should ever
pass a non-NULL
value for layout_handle
are
layout policy modules.
Callers of nasd_odc_ref_ranges()
should hold the write lock
of the partition that the blocks belong to, if they belong to a particular
partition.
![]() | ![]() | ![]() |
---|---|---|
Cache | Mapping | NASD Programmer's Documentation |