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)
83 #define dmz_bio_chunk(zmd, bio) ((bio)->bi_iter.bi_sector >> \
85 #define dmz_chunk_block(zmd, b) ((b) & (dmz_zone_nr_blocks(zmd) - 1))
121 * For a sequential data zone, pointer to the random zone
122 * used as a buffer for processing unaligned writes.
123 * For a buffer zone, this points back to the data zone.
156 #define dmz_is_cache(z) test_bit(DMZ_CACHE, &(z)->flags) argument
157 #define dmz_is_rnd(z) test_bit(DMZ_RND, &(z)->flags) argument
158 #define dmz_is_seq(z) test_bit(DMZ_SEQ, &(z)->flags) argument
159 #define dmz_is_empty(z) ((z)->wp_block == 0) argument
160 #define dmz_is_offline(z) test_bit(DMZ_OFFLINE, &(z)->flags) argument
161 #define dmz_is_readonly(z) test_bit(DMZ_READ_ONLY, &(z)->flags) argument
162 #define dmz_in_reclaim(z) test_bit(DMZ_RECLAIM, &(z)->flags) argument
163 #define dmz_is_reserved(z) test_bit(DMZ_RESERVED, &(z)->flags) argument
164 #define dmz_seq_write_err(z) test_bit(DMZ_SEQ_WRITE_ERR, &(z)->flags) argument
165 #define dmz_reclaim_should_terminate(z) \ argument
166 test_bit(DMZ_RECLAIM_TERMINATE, &(z)->flags)
168 #define dmz_is_meta(z) test_bit(DMZ_META, &(z)->flags) argument
169 #define dmz_is_buf(z) test_bit(DMZ_BUF, &(z)->flags) argument
170 #define dmz_is_data(z) test_bit(DMZ_DATA, &(z)->flags) argument
172 #define dmz_weight(z) ((z)->weight) argument
178 DMINFO("(%pg): " format, (dev)->bdev, ## args)
181 DMERR("(%pg): " format, (dev)->bdev, ## args)
184 DMWARN("(%pg): " format, (dev)->bdev, ## args)
187 DMDEBUG("(%pg): " format, (dev)->bdev, ## args)
190 * Functions defined in dm-zoned-metadata.c
238 * Activate a zone (increment its reference count).
242 atomic_inc(&zone->refcount); in dmz_activate_zone()
270 * Functions defined in dm-zoned-reclaim.c
280 * Functions defined in dm-zoned-target.c
286 * Deactivate a zone. This decrement the zone reference counter
291 dmz_reclaim_bio_acc(zone->dev->reclaim); in dmz_deactivate_zone()
292 atomic_dec(&zone->refcount); in dmz_deactivate_zone()
296 * Test if a zone is active, that is, has a refcount > 0.
300 return atomic_read(&zone->refcount); in dmz_is_active()