dm-snap.c (3510cb94ff7b04b016bd22bfee913e2c1c05c066) | dm-snap.c (985903bb3a6d98623360ab6c855417f638840029) |
---|---|
1/* 2 * dm-snapshot.c 3 * 4 * Copyright (C) 2001-2002 Sistina Software (UK) Limited. 5 * 6 * This file is released under the GPL. 7 */ 8 --- 1160 unchanged lines hidden (view full) --- 1169 switch (type) { 1170 case STATUSTYPE_INFO: 1171 1172 down_write(&snap->lock); 1173 1174 if (!snap->valid) 1175 DMEMIT("Invalid"); 1176 else { | 1/* 2 * dm-snapshot.c 3 * 4 * Copyright (C) 2001-2002 Sistina Software (UK) Limited. 5 * 6 * This file is released under the GPL. 7 */ 8 --- 1160 unchanged lines hidden (view full) --- 1169 switch (type) { 1170 case STATUSTYPE_INFO: 1171 1172 down_write(&snap->lock); 1173 1174 if (!snap->valid) 1175 DMEMIT("Invalid"); 1176 else { |
1177 if (snap->store->type->fraction_full) { 1178 sector_t numerator, denominator; 1179 snap->store->type->fraction_full(snap->store, 1180 &numerator, 1181 &denominator); 1182 DMEMIT("%llu/%llu", 1183 (unsigned long long)numerator, 1184 (unsigned long long)denominator); | 1177 if (snap->store->type->usage) { 1178 sector_t total_sectors, sectors_allocated, 1179 metadata_sectors; 1180 snap->store->type->usage(snap->store, 1181 &total_sectors, 1182 §ors_allocated, 1183 &metadata_sectors); 1184 DMEMIT("%llu/%llu %llu", 1185 (unsigned long long)sectors_allocated, 1186 (unsigned long long)total_sectors, 1187 (unsigned long long)metadata_sectors); |
1185 } 1186 else 1187 DMEMIT("Unknown"); 1188 } 1189 1190 up_write(&snap->lock); 1191 1192 break; --- 264 unchanged lines hidden (view full) --- 1457 .map = origin_map, 1458 .resume = origin_resume, 1459 .status = origin_status, 1460 .iterate_devices = origin_iterate_devices, 1461}; 1462 1463static struct target_type snapshot_target = { 1464 .name = "snapshot", | 1188 } 1189 else 1190 DMEMIT("Unknown"); 1191 } 1192 1193 up_write(&snap->lock); 1194 1195 break; --- 264 unchanged lines hidden (view full) --- 1460 .map = origin_map, 1461 .resume = origin_resume, 1462 .status = origin_status, 1463 .iterate_devices = origin_iterate_devices, 1464}; 1465 1466static struct target_type snapshot_target = { 1467 .name = "snapshot", |
1465 .version = {1, 7, 0}, | 1468 .version = {1, 8, 0}, |
1466 .module = THIS_MODULE, 1467 .ctr = snapshot_ctr, 1468 .dtr = snapshot_dtr, 1469 .map = snapshot_map, 1470 .end_io = snapshot_end_io, 1471 .resume = snapshot_resume, 1472 .status = snapshot_status, 1473 .iterate_devices = snapshot_iterate_devices, --- 100 unchanged lines hidden --- | 1469 .module = THIS_MODULE, 1470 .ctr = snapshot_ctr, 1471 .dtr = snapshot_dtr, 1472 .map = snapshot_map, 1473 .end_io = snapshot_end_io, 1474 .resume = snapshot_resume, 1475 .status = snapshot_status, 1476 .iterate_devices = snapshot_iterate_devices, --- 100 unchanged lines hidden --- |