mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 09:12:07 +00:00
dm: zoned: Remove unused functions
dmz_resume_metadata() is unused since it was added in commit3b1a94c88b
("dm zoned: drive-managed zoned block device target") dmz_zone_nr_blocks_shift is unused since it was added in commit3682056013
("dm zoned: move fields from struct dmz_dev to dmz_metadata") Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
This commit is contained in:
parent
ad9266118c
commit
3571fc2f9d
@ -245,11 +245,6 @@ unsigned int dmz_zone_nr_blocks(struct dmz_metadata *zmd)
|
|||||||
return zmd->zone_nr_blocks;
|
return zmd->zone_nr_blocks;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int dmz_zone_nr_blocks_shift(struct dmz_metadata *zmd)
|
|
||||||
{
|
|
||||||
return zmd->zone_nr_blocks_shift;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int dmz_zone_nr_sectors(struct dmz_metadata *zmd)
|
unsigned int dmz_zone_nr_sectors(struct dmz_metadata *zmd)
|
||||||
{
|
{
|
||||||
return zmd->zone_nr_sectors;
|
return zmd->zone_nr_sectors;
|
||||||
@ -3005,48 +3000,3 @@ void dmz_dtr_metadata(struct dmz_metadata *zmd)
|
|||||||
dmz_cleanup_metadata(zmd);
|
dmz_cleanup_metadata(zmd);
|
||||||
kfree(zmd);
|
kfree(zmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Check zone information on resume.
|
|
||||||
*/
|
|
||||||
int dmz_resume_metadata(struct dmz_metadata *zmd)
|
|
||||||
{
|
|
||||||
struct dm_zone *zone;
|
|
||||||
sector_t wp_block;
|
|
||||||
unsigned int i;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* Check zones */
|
|
||||||
for (i = 0; i < zmd->nr_zones; i++) {
|
|
||||||
zone = dmz_get(zmd, i);
|
|
||||||
if (!zone) {
|
|
||||||
dmz_zmd_err(zmd, "Unable to get zone %u", i);
|
|
||||||
return -EIO;
|
|
||||||
}
|
|
||||||
wp_block = zone->wp_block;
|
|
||||||
|
|
||||||
ret = dmz_update_zone(zmd, zone);
|
|
||||||
if (ret) {
|
|
||||||
dmz_zmd_err(zmd, "Broken zone %u", i);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dmz_is_offline(zone)) {
|
|
||||||
dmz_zmd_warn(zmd, "Zone %u is offline", i);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check write pointer */
|
|
||||||
if (!dmz_is_seq(zone))
|
|
||||||
zone->wp_block = 0;
|
|
||||||
else if (zone->wp_block != wp_block) {
|
|
||||||
dmz_zmd_err(zmd, "Zone %u: Invalid wp (%llu / %llu)",
|
|
||||||
i, (u64)zone->wp_block, (u64)wp_block);
|
|
||||||
zone->wp_block = wp_block;
|
|
||||||
dmz_invalidate_blocks(zmd, zone, zone->wp_block,
|
|
||||||
zmd->zone_nr_blocks - zone->wp_block);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
@ -192,7 +192,6 @@ enum {
|
|||||||
int dmz_ctr_metadata(struct dmz_dev *dev, int num_dev,
|
int dmz_ctr_metadata(struct dmz_dev *dev, int num_dev,
|
||||||
struct dmz_metadata **zmd, const char *devname);
|
struct dmz_metadata **zmd, const char *devname);
|
||||||
void dmz_dtr_metadata(struct dmz_metadata *zmd);
|
void dmz_dtr_metadata(struct dmz_metadata *zmd);
|
||||||
int dmz_resume_metadata(struct dmz_metadata *zmd);
|
|
||||||
|
|
||||||
void dmz_lock_map(struct dmz_metadata *zmd);
|
void dmz_lock_map(struct dmz_metadata *zmd);
|
||||||
void dmz_unlock_map(struct dmz_metadata *zmd);
|
void dmz_unlock_map(struct dmz_metadata *zmd);
|
||||||
@ -230,7 +229,6 @@ unsigned int dmz_nr_unmap_rnd_zones(struct dmz_metadata *zmd, int idx);
|
|||||||
unsigned int dmz_nr_seq_zones(struct dmz_metadata *zmd, int idx);
|
unsigned int dmz_nr_seq_zones(struct dmz_metadata *zmd, int idx);
|
||||||
unsigned int dmz_nr_unmap_seq_zones(struct dmz_metadata *zmd, int idx);
|
unsigned int dmz_nr_unmap_seq_zones(struct dmz_metadata *zmd, int idx);
|
||||||
unsigned int dmz_zone_nr_blocks(struct dmz_metadata *zmd);
|
unsigned int dmz_zone_nr_blocks(struct dmz_metadata *zmd);
|
||||||
unsigned int dmz_zone_nr_blocks_shift(struct dmz_metadata *zmd);
|
|
||||||
unsigned int dmz_zone_nr_sectors(struct dmz_metadata *zmd);
|
unsigned int dmz_zone_nr_sectors(struct dmz_metadata *zmd);
|
||||||
unsigned int dmz_zone_nr_sectors_shift(struct dmz_metadata *zmd);
|
unsigned int dmz_zone_nr_sectors_shift(struct dmz_metadata *zmd);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user