Skip to content

Commit f8872b3

Browse files
committed
btrfs-progs: remove is_vol_small() helper
The last user of the helper is removed in commit c11e36a ("Btrfs-progs: Do not force mixed block group creation unless '-M' option is specified"). So there is no one using this helper, and we can safely remove it. Reviewed-by: Anand Jain <[email protected]> Signed-off-by: Qu Wenruo <[email protected]>
1 parent 26cebc4 commit f8872b3

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

mkfs/common.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,35 +1167,6 @@ bool test_status_for_mkfs(const char *file, bool force_overwrite)
11671167
return false;
11681168
}
11691169

1170-
int is_vol_small(const char *file)
1171-
{
1172-
int fd = -1;
1173-
int e;
1174-
struct stat st;
1175-
u64 size;
1176-
1177-
fd = open(file, O_RDONLY);
1178-
if (fd < 0)
1179-
return -errno;
1180-
if (fstat(fd, &st) < 0) {
1181-
e = -errno;
1182-
close(fd);
1183-
return e;
1184-
}
1185-
size = device_get_partition_size_fd_stat(fd, &st);
1186-
if (size == 0) {
1187-
close(fd);
1188-
return -1;
1189-
}
1190-
if (size < BTRFS_MKFS_SMALL_VOLUME_SIZE) {
1191-
close(fd);
1192-
return 1;
1193-
} else {
1194-
close(fd);
1195-
return 0;
1196-
}
1197-
}
1198-
11991170
int test_minimum_size(const char *file, u64 min_dev_size)
12001171
{
12011172
int fd;

mkfs/common.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ int make_btrfs(int fd, struct btrfs_mkfs_config *cfg);
106106
u64 btrfs_min_dev_size(u32 nodesize, bool mixed, u64 zone_size, u64 meta_profile,
107107
u64 data_profile);
108108
int test_minimum_size(const char *file, u64 min_dev_size);
109-
int is_vol_small(const char *file);
110109
int test_num_disk_vs_raid(u64 metadata_profile, u64 data_profile,
111110
u64 dev_cnt, int mixed, int ssd);
112111
bool test_status_for_mkfs(const char *file, bool force_overwrite);

0 commit comments

Comments
 (0)