Lines Matching +full:a +full:- +full:z

1 /* SPDX-License-Identifier: GPL-2.0 */
13 #include <linux/device-mapper.h>
14 #include <linux/dm-kcopyd.h>
21 #include <linux/radix-tree.h>
25 * dm-zoned creates block devices with 4KB blocks, always.
29 #define DMZ_BLOCK_MASK (DMZ_BLOCK_SIZE - 1)
33 #define DMZ_BLOCK_MASK_BITS (DMZ_BLOCK_SIZE_BITS - 1)
35 #define DMZ_BLOCK_SECTORS_SHIFT (DMZ_BLOCK_SHIFT - SECTOR_SHIFT)
37 #define DMZ_BLOCK_SECTORS_MASK (DMZ_BLOCK_SECTORS - 1)
40 * 4KB block <-> 512B sector conversion.
45 #define dmz_bio_block(bio) dmz_sect2blk((bio)->bi_iter.bi_sector)
84 #define dmz_bio_chunk(zmd, bio) ((bio)->bi_iter.bi_sector >> \
86 #define dmz_chunk_block(zmd, b) ((b) & (dmz_zone_nr_blocks(zmd) - 1))
122 * For a sequential data zone, pointer to the random zone
123 * used as a buffer for processing unaligned writes.
124 * For a buffer zone, this points back to the data zone.
157 #define dmz_is_cache(z) test_bit(DMZ_CACHE, &(z)->flags) argument
158 #define dmz_is_rnd(z) test_bit(DMZ_RND, &(z)->flags) argument
159 #define dmz_is_seq(z) test_bit(DMZ_SEQ, &(z)->flags) argument
160 #define dmz_is_empty(z) ((z)->wp_block == 0) argument
161 #define dmz_is_offline(z) test_bit(DMZ_OFFLINE, &(z)->flags) argument
162 #define dmz_is_readonly(z) test_bit(DMZ_READ_ONLY, &(z)->flags) argument
163 #define dmz_in_reclaim(z) test_bit(DMZ_RECLAIM, &(z)->flags) argument
164 #define dmz_is_reserved(z) test_bit(DMZ_RESERVED, &(z)->flags) argument
165 #define dmz_seq_write_err(z) test_bit(DMZ_SEQ_WRITE_ERR, &(z)->flags) argument
166 #define dmz_reclaim_should_terminate(z) \ argument
167 test_bit(DMZ_RECLAIM_TERMINATE, &(z)->flags)
169 #define dmz_is_meta(z) test_bit(DMZ_META, &(z)->flags) argument
170 #define dmz_is_buf(z) test_bit(DMZ_BUF, &(z)->flags) argument
171 #define dmz_is_data(z) test_bit(DMZ_DATA, &(z)->flags) argument
173 #define dmz_weight(z) ((z)->weight) argument
179 DMINFO("(%s): " format, (dev)->name, ## args)
182 DMERR("(%s): " format, (dev)->name, ## args)
185 DMWARN("(%s): " format, (dev)->name, ## args)
188 DMDEBUG("(%s): " format, (dev)->name, ## args)
191 * Functions defined in dm-zoned-metadata.c
239 * Activate a zone (increment its reference count).
243 atomic_inc(&zone->refcount); in dmz_activate_zone()
271 * Functions defined in dm-zoned-reclaim.c
281 * Functions defined in dm-zoned-target.c
287 * Deactivate a zone. This decrement the zone reference counter
292 dmz_reclaim_bio_acc(zone->dev->reclaim); in dmz_deactivate_zone()
293 atomic_dec(&zone->refcount); in dmz_deactivate_zone()
297 * Test if a zone is active, that is, has a refcount > 0.
301 return atomic_read(&zone->refcount); in dmz_is_active()