2001-09-25 16:49:28 +04:00
/*
* Copyright ( C ) 2001 Sistina Software
*
* This LVM library is free software ; you can redistribute it and / or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation ; either
* version 2 of the License , or ( at your option ) any later version .
*
* This LVM library is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU
* Library General Public License for more details .
*
* You should have received a copy of the GNU Library General Public
* License along with this LVM library ; if not , write to the Free
* Software Foundation , Inc . , 59 Temple Place - Suite 330 , Boston ,
* MA 02111 - 1307 , USA
*
*/
# include <sys/types.h>
# include <string.h>
2001-10-01 19:14:39 +04:00
# include "metadata.h"
# include "dbg_malloc.h"
# include "log.h"
2001-10-18 20:55:19 +04:00
# include "display.h"
2001-11-08 19:15:58 +03:00
# include "activate.h"
2001-09-25 16:49:28 +04:00
# define SIZE_BUF 128
char * display_size ( unsigned long long size , size_len_t sl )
{
int s ;
ulong byte = 1024 * 1024 * 1024 ;
char * size_buf = NULL ;
char * size_str [ ] [ 2 ] = {
{ " Terabyte " , " TB " } ,
{ " Gigabyte " , " GB " } ,
{ " Megabyte " , " MB " } ,
{ " Kilobyte " , " KB " } ,
{ " " , " " }
} ;
if ( ! ( size_buf = dbg_malloc ( SIZE_BUF ) ) ) {
log_error ( " no memory for size display buffer " ) ;
return NULL ;
}
if ( size = = 0LL )
sprintf ( size_buf , " 0 " ) ;
else {
s = 0 ;
while ( size_str [ s ] & & size < byte )
s + + , byte / = 1024 ;
snprintf ( size_buf , SIZE_BUF - 1 ,
" %.2f %s " , ( float ) size / byte , size_str [ s ] [ sl ] ) ;
}
/* Caller to deallocate */
return size_buf ;
}
2001-10-04 14:13:07 +04:00
/*
* FIXME : this function is badly named , it doesn ' t display the data it
* creates a new uuid string with - ' s in it . It would be better if
* the destination was passed in as well . EJT
*/
2001-11-13 20:53:06 +03:00
char * display_uuid ( char * uuidstr )
{
2001-09-25 16:49:28 +04:00
int i , j ;
char * uuid ;
if ( ( ! uuidstr ) | | ! ( uuid = dbg_malloc ( NAME_LEN ) ) ) {
log_error ( " no memory for uuid display buffer " ) ;
return NULL ;
}
memset ( uuid , 0 , NAME_LEN ) ;
i = 6 ;
memcpy ( uuid , uuidstr , i ) ;
uuidstr + = i ;
for ( j = 0 ; j < 6 ; j + + ) {
uuid [ i + + ] = ' - ' ;
memcpy ( & uuid [ i ] , uuidstr , 4 ) ;
uuidstr + = 4 ;
i + = 4 ;
}
memcpy ( & uuid [ i ] , uuidstr , 2 ) ;
/* Caller must free */
return uuid ;
}
2001-10-18 20:55:19 +04:00
void pvdisplay_colons ( struct physical_volume * pv )
{
char * uuid ;
if ( ! pv )
return ;
uuid = display_uuid ( pv - > id . uuid ) ;
2001-11-15 18:18:53 +03:00
log_print ( " %s:%s:% " PRIu64 " :-1:%u:%u:-1:% " PRIu64 " :%u:%u:%u:%s " ,
2001-11-13 20:53:06 +03:00
dev_name ( pv - > dev ) , pv - > vg_name , pv - > size ,
/* FIXME pv->pv_number, Derive or remove? */
pv - > status , /* FIXME Support old or new format here? */
2002-01-10 18:09:51 +03:00
pv - > status & ALLOCATABLE_PV , /* FIXME remove? */
2001-11-13 20:53:06 +03:00
/* FIXME pv->lv_cur, Remove? */
pv - > pe_size / 2 ,
pv - > pe_count ,
pv - > pe_count - pv - > pe_allocated ,
pv - > pe_allocated , * uuid ? uuid : " none " ) ;
2001-10-18 20:55:19 +04:00
dbg_free ( uuid ) ;
return ;
}
2001-11-13 20:53:06 +03:00
void pvdisplay_full ( struct physical_volume * pv )
2001-10-18 20:55:19 +04:00
{
2001-11-13 20:53:06 +03:00
char * uuid ;
char * size , * size1 ; /*, *size2; */
2001-10-18 20:55:19 +04:00
uint64_t pe_free ;
2001-11-13 20:53:06 +03:00
if ( ! pv )
return ;
2001-10-18 20:55:19 +04:00
uuid = display_uuid ( pv - > id . uuid ) ;
log_print ( " --- %sPhysical volume --- " , pv - > pe_size ? " " : " NEW " ) ;
2001-10-25 18:04:18 +04:00
log_print ( " PV Name %s " , dev_name ( pv - > dev ) ) ;
2001-10-18 20:55:19 +04:00
log_print ( " VG Name %s " , pv - > vg_name ) ;
size = display_size ( pv - > size / 2 , SIZE_SHORT ) ;
if ( pv - > pe_size & & pv - > pe_count ) {
2001-11-13 20:53:06 +03:00
size1 = display_size ( ( pv - > size - pv - > pe_count * pv - > pe_size )
/ 2 , SIZE_SHORT ) ;
2001-10-18 20:55:19 +04:00
/******** FIXME display LVM on-disk data size
size2 = display_size ( pv - > size / 2 , SIZE_SHORT ) ;
* * * * * * * */
2001-11-13 20:53:06 +03:00
log_print ( " PV Size %s " " / not usable %s " , /* [LVM: %s]", */
size , size1 ) ; /* , size2); */
2001-10-18 20:55:19 +04:00
dbg_free ( size1 ) ;
/* dbg_free(size2); */
} else
log_print ( " PV Size %s " , size ) ;
dbg_free ( size ) ;
/*********FIXME Anything use this?
log_print ( " PV# %u " , pv - > pv_number ) ;
* * * * * * * * * */
pe_free = pv - > pe_count - pv - > pe_allocated ;
2002-01-10 18:09:51 +03:00
if ( pv - > pe_count & & ( pv - > status & ALLOCATABLE_PV ) )
2001-10-18 20:55:19 +04:00
log_print ( " Allocatable yes %s " ,
( ! pe_free & & pv - > pe_count ) ? " (but full) " : " " ) ;
else
log_print ( " Allocatable NO " ) ;
/*********FIXME
log_print ( " Cur LV %u " , pv - > lv_cur ) ;
* * * * * * * * */
2001-11-15 18:18:53 +03:00
log_print ( " PE Size (KByte) % " PRIu64 , pv - > pe_size / 2 ) ;
2001-10-18 20:55:19 +04:00
log_print ( " Total PE %u " , pv - > pe_count ) ;
2001-11-15 18:18:53 +03:00
log_print ( " Free PE % " PRIu64 , pe_free ) ;
2001-10-18 20:55:19 +04:00
log_print ( " Allocated PE %u " , pv - > pe_allocated ) ;
# ifdef LVM_FUTURE
printf ( " Stale PE %u " , pv - > pe_stale ) ;
# endif
log_print ( " PV UUID %s " , * uuid ? uuid : " none " ) ;
log_print ( " " ) ;
dbg_free ( uuid ) ;
return ;
}
2001-11-19 18:20:50 +03:00
int pvdisplay_short ( struct volume_group * vg , struct physical_volume * pv )
2001-10-18 20:55:19 +04:00
{
2001-11-13 20:53:06 +03:00
if ( ! pv )
2001-11-19 18:20:50 +03:00
return 0 ;
2001-10-18 20:55:19 +04:00
2001-10-25 18:04:18 +04:00
log_print ( " PV Name %s " , dev_name ( pv - > dev ) ) ;
2001-10-18 20:55:19 +04:00
/* FIXME pv->pv_number); */
2002-01-11 02:21:07 +03:00
log_print ( " PV Status %sallocatable " ,
2002-01-10 18:09:51 +03:00
( pv - > status & ALLOCATABLE_PV ) ? " " : " NOT " ) ;
2001-10-18 20:55:19 +04:00
log_print ( " Total PE / Free PE %u / %u " ,
2001-11-13 20:53:06 +03:00
pv - > pe_count , pv - > pe_count - pv - > pe_allocated ) ;
2001-10-18 20:55:19 +04:00
2001-11-19 18:20:50 +03:00
log_print ( " " ) ;
return 0 ;
2001-10-18 20:55:19 +04:00
}
2001-11-08 19:15:58 +03:00
void lvdisplay_colons ( struct logical_volume * lv )
2001-10-18 20:55:19 +04:00
{
2001-11-21 22:32:35 +03:00
int inkernel ;
struct dm_info info ;
inkernel = lv_info ( lv , & info ) & & info . exists ;
log_print ( " %s%s/%s:%s:%d:%d:-1:%d:% " PRIu64 " :%d:-1:%d:%d:%d:%d " ,
lv - > vg - > cmd - > dev_dir ,
2001-11-08 19:15:58 +03:00
lv - > vg - > name ,
2001-11-13 20:53:06 +03:00
lv - > name ,
lv - > vg - > name ,
( lv - > status & ( LVM_READ | LVM_WRITE ) ) > > 8 ,
2001-11-21 22:32:35 +03:00
inkernel ? 1 : 0 ,
2001-11-13 20:53:06 +03:00
/* FIXME lv->lv_number, */
2001-11-21 22:32:35 +03:00
inkernel ? info . open_count : 0 , lv - > size , lv - > le_count ,
2001-11-13 20:53:06 +03:00
/* FIXME Add num allocated to struct! lv->lv_allocated_le, */
( ( lv - > status & ALLOC_STRICT ) +
2001-11-21 22:32:35 +03:00
( lv - > status & ALLOC_CONTIGUOUS ) * 2 ) , lv - > read_ahead ,
inkernel ? info . major : - 1 ,
inkernel ? info . minor : - 1
2001-11-13 20:53:06 +03:00
) ;
2001-10-18 20:55:19 +04:00
return ;
}
2001-11-19 18:20:50 +03:00
int lvdisplay_full ( struct logical_volume * lv )
2001-10-18 20:55:19 +04:00
{
2001-11-08 19:15:58 +03:00
char * size ;
uint32_t alloc ;
2001-11-21 22:32:35 +03:00
struct dm_info info ;
int inkernel ;
inkernel = lv_info ( lv , & info ) & & info . exists ;
2001-10-18 20:55:19 +04:00
2001-11-13 20:53:06 +03:00
log_print ( " --- Logical volume --- " ) ;
2001-10-18 20:55:19 +04:00
2001-11-21 22:32:35 +03:00
log_print ( " LV Name %s%s/%s " , lv - > vg - > cmd - > dev_dir ,
lv - > vg - > name , lv - > name ) ;
2001-11-13 20:53:06 +03:00
log_print ( " VG Name %s " , lv - > vg - > name ) ;
2001-11-08 19:15:58 +03:00
2001-11-13 20:53:06 +03:00
log_print ( " LV Write Access %s " ,
( lv - > status & LVM_WRITE ) ? " read/write " : " read only " ) ;
2001-10-18 20:55:19 +04:00
2001-11-08 19:15:58 +03:00
/******* FIXME Snapshot
if ( lv - > status & ( LVM_SNAPSHOT_ORG | LVM_SNAPSHOT ) ) {
if ( lvm_tab_vg_read_with_pv_and_lv ( vg_name , & vg ) < 0 ) {
ret = - LVM_ELV_SHOW_VG_READ_WITH_PV_AND_LV ;
goto lv_show_end ;
}
printf ( " LV snapshot status " ) ;
if ( vg_check_active ( vg_name ) = = TRUE ) {
vg_t * vg_core ;
if ( ( ret = vg_status_with_pv_and_lv ( vg_name , & vg_core ) ) = = 0 ) {
lv_t * lv_ptr =
vg_core - >
lv [ lv_get_index_by_name ( vg_core , lv - > lv_name ) ] ;
if ( lv_ptr - > lv_access & LV_SNAPSHOT ) {
if ( lv_ptr - > lv_status & LV_ACTIVE )
printf ( " active " ) ;
else
printf ( " INACTIVE " ) ;
}
if ( lv_ptr - > lv_access & LV_SNAPSHOT_ORG ) {
printf ( " source of \n " ) ;
while ( lv_ptr - > lv_snapshot_next ! = NULL ) {
lv_ptr = lv_ptr - > lv_snapshot_next ;
printf ( " %s [%s] \n " ,
lv_ptr - > lv_name ,
( lv_ptr - >
lv_status & LV_ACTIVE ) ? " active " :
" INACTIVE " ) ;
}
vg_free ( vg_core , TRUE ) ;
} else {
printf ( " destination for %s \n " ,
lv_ptr - > lv_snapshot_org - > lv_name ) ;
2001-10-18 20:55:19 +04:00
}
2001-11-08 19:15:58 +03:00
}
} else {
printf ( " INACTIVE " ) ;
if ( lv - > lv_access & LV_SNAPSHOT_ORG )
printf ( " original \n " ) ;
else
printf ( " snapshot \n " ) ;
2001-10-18 20:55:19 +04:00
}
2001-11-08 19:15:58 +03:00
}
* * * * * * * * * * */
2001-11-21 22:32:35 +03:00
if ( inkernel & & info . suspended )
log_print ( " LV Status suspended " ) ;
else
log_print ( " LV Status %savailable " ,
inkernel ? " " : " NOT " ) ;
2001-11-08 19:15:58 +03:00
/********* FIXME lv_number
log_print ( " LV # %u " , lv - > lv_number + 1 ) ;
* * * * * * * * * * * */
2001-11-21 22:32:35 +03:00
if ( inkernel )
log_print ( " # open %u " , info . open_count ) ;
2001-11-08 19:15:58 +03:00
/********
# ifdef LVM_FUTURE
printf ( " Mirror copies %u \n " , lv - > lv_mirror_copies ) ;
printf ( " Consistency recovery " ) ;
if ( lv - > lv_recovery | LV_BADBLOCK_ON )
printf ( " bad blocks \n " ) ;
else
printf ( " none \n " ) ;
printf ( " Schedule %u \n " , lv - > lv_schedule ) ;
# endif
* * * * * * * */
size = display_size ( lv - > size / 2 , SIZE_SHORT ) ;
2001-11-13 20:53:06 +03:00
log_print ( " LV Size %s " , size ) ;
dbg_free ( size ) ;
2001-10-18 20:55:19 +04:00
2001-11-13 20:53:06 +03:00
log_print ( " Current LE %u " , lv - > le_count ) ;
2001-11-08 19:15:58 +03:00
/********** FIXME allocation
log_print ( " Allocated LE %u " , lv - > allocated_le ) ;
* * * * * * * * * */
/********** FIXME Snapshot
if ( lv - > lv_access & LV_SNAPSHOT ) {
printf ( " snapshot chunk size %s \n " ,
( dummy = lvm_show_size ( lv - > lv_chunk_size / 2 , SHORT ) ) ) ;
dbg_free ( dummy ) ;
dummy = NULL ;
if ( lv - > lv_remap_end > 0 ) {
lv_remap_ptr = lv - > lv_remap_ptr ;
if ( lv_remap_ptr > lv - > lv_remap_end )
lv_remap_ptr = lv - > lv_remap_end ;
dummy = lvm_show_size ( lv_remap_ptr *
lv - > lv_chunk_size / 2 , SHORT ) ;
dummy1 = lvm_show_size ( lv - > lv_remap_end *
lv - > lv_chunk_size / 2 , SHORT ) ;
printf ( " Allocated to snapshot %.2f%% [%s/%s] \n " ,
( float ) lv_remap_ptr * 100 / lv - > lv_remap_end ,
dummy , dummy1 ) ;
dbg_free ( dummy ) ;
dbg_free ( dummy1 ) ;
dummy =
lvm_show_size ( ( vg - >
lv [ lv_get_index_by_number
( vg ,
lv - > lv_number ) ] - > lv_size -
lv - > lv_remap_end * lv - > lv_chunk_size ) / 2 ,
SHORT ) ;
printf ( " Allocated to COW-table %s \n " , dummy ) ;
dbg_free ( dummy ) ;
2001-10-18 20:55:19 +04:00
}
2001-11-08 19:15:58 +03:00
}
* * * * * * * * * * * * * * * * * */
2001-10-18 20:55:19 +04:00
2001-11-28 16:45:50 +03:00
log_print ( " Segments %u " , list_size ( & lv - > segments ) ) ;
/********* FIXME Stripes & stripesize for each segment
2001-11-08 19:15:58 +03:00
log_print ( " Stripe size (KByte) %u " , lv - > stripesize / 2 ) ;
* * * * * * * * * * */
2001-10-18 20:55:19 +04:00
2001-11-08 19:15:58 +03:00
/**************
# ifdef LVM_FUTURE
printf ( " Bad block " ) ;
if ( lv - > lv_badblock = = LV_BADBLOCK_ON )
printf ( " on \n " ) ;
else
printf ( " off \n " ) ;
# endif
* * * * * * * * * * * * * * */
2001-10-18 20:55:19 +04:00
2001-11-13 20:53:06 +03:00
/* FIXME next free == ALLOC_SIMPLE */
2001-11-08 19:15:58 +03:00
alloc = lv - > status & ( ALLOC_STRICT | ALLOC_CONTIGUOUS ) ;
2001-11-13 20:53:06 +03:00
log_print ( " Allocation %s%s%s%s " ,
! ( alloc & ( ALLOC_STRICT | ALLOC_CONTIGUOUS ) ) ? " next free " :
" " , ( alloc = = ALLOC_STRICT ) ? " strict " : " " ,
( alloc = = ALLOC_CONTIGUOUS ) ? " contiguous " : " " ,
( alloc = =
( ALLOC_STRICT | ALLOC_CONTIGUOUS ) ) ? " strict/contiguous " :
" " ) ;
2001-10-18 20:55:19 +04:00
2001-11-21 22:32:35 +03:00
log_print ( " Read ahead sectors %u " , lv - > read_ahead ) ;
2001-10-18 20:55:19 +04:00
2001-11-08 19:15:58 +03:00
/****************
# ifdef LVM_FUTURE
printf ( " IO Timeout (seconds) " ) ;
if ( lv - > lv_io_timeout = = 0 )
printf ( " default \n \n " ) ;
else
printf ( " %lu \n \n " , lv - > lv_io_timeout ) ;
2001-10-18 20:55:19 +04:00
# endif
2001-11-08 19:15:58 +03:00
* * * * * * * * * * * * */
2001-11-21 22:32:35 +03:00
if ( inkernel )
log_print ( " Block device %d:%d " , info . major ,
info . minor ) ;
log_print ( " " ) ;
2001-11-08 19:15:58 +03:00
2001-11-19 18:20:50 +03:00
return 0 ;
2001-11-08 19:15:58 +03:00
}
2001-10-18 20:55:19 +04:00
2001-11-13 20:53:06 +03:00
void lvdisplay_extents ( struct logical_volume * lv )
{
int le ;
struct list * pvh ;
struct physical_volume * pv ;
2001-12-03 23:23:53 +03:00
log_print ( " --- Distribution of logical volume on physical "
2001-11-13 20:53:06 +03:00
" volumes --- " ) ;
2001-12-03 23:23:53 +03:00
log_print ( " PV Name PE on PV " ) ;
2001-11-13 20:53:06 +03:00
2001-11-28 16:45:50 +03:00
/********* FIXME Segments & Stripes
2001-11-13 20:53:06 +03:00
list_iterate ( pvh , & lv - > vg - > pvs ) {
int count = 0 ;
pv = & list_item ( pvh , struct pv_list ) - > pv ;
for ( le = 0 ; le < lv - > le_count ; le + + )
if ( lv - > map [ le ] . pv - > dev = = pv - > dev )
count + + ;
if ( count )
2001-12-03 23:23:53 +03:00
log_print ( " %-25s %d " , dev_name ( pv - > dev ) , count ) ;
2001-11-13 20:53:06 +03:00
}
2001-11-28 16:45:50 +03:00
* * * * * * * * * */
2001-11-13 20:53:06 +03:00
/********* FIXME "reads writes"
printf ( " \n --- logical volume i/o statistic --- \n "
" %d reads %d writes \n " , sum_reads , sum_writes ) ;
* * * * * * * */
2001-12-03 23:23:53 +03:00
log_print ( " " ) ;
log_print ( " --- Logical extents --- " ) ;
log_print ( " LE PV PE " ) ;
2001-11-13 20:53:06 +03:00
2001-11-28 16:45:50 +03:00
/******** FIXME Segments & Stripes
2001-11-13 20:53:06 +03:00
for ( le = 0 ; le < lv - > le_count ; le + + ) {
2001-12-03 23:23:53 +03:00
log_print ( " %05d %-25s %05u " , le ,
2001-11-13 20:53:06 +03:00
dev_name ( lv - > map [ le ] . pv - > dev ) , lv - > map [ le ] . pe ) ;
}
2001-11-28 16:45:50 +03:00
* * * * * */
2001-11-13 20:53:06 +03:00
2001-12-03 23:23:53 +03:00
log_print ( " " ) ;
2001-11-19 18:20:50 +03:00
return ;
}
void vgdisplay_extents ( struct volume_group * vg )
{
return ;
}
void vgdisplay_full ( struct volume_group * vg )
{
uint32_t access ;
char * s1 ;
log_print ( " --- Volume group --- " ) ;
log_print ( " VG Name %s " , vg - > name ) ;
access = vg - > status & ( LVM_READ | LVM_WRITE ) ;
log_print ( " VG Access %s%s%s%s " ,
access = = ( LVM_READ | LVM_WRITE ) ? " read/write " : " " ,
access = = LVM_READ ? " read " : " " ,
access = = LVM_WRITE ? " write " : " " ,
access = = 0 ? " error " : " " ) ;
2002-01-11 02:21:07 +03:00
log_print ( " VG Status %s/%sresizable " ,
vg - > status & EXPORTED_VG ? " exported " : " " ,
2002-01-10 18:09:51 +03:00
vg - > status & RESIZEABLE_VG ? " " : " NOT " ) ;
2001-11-19 18:20:50 +03:00
/******* FIXME vg number
log_print ( " VG # %u \n " , vg - > vg_number ) ;
* * * * * * * */
if ( vg - > status & CLUSTERED ) {
log_print ( " Clustered yes " ) ;
log_print ( " Shared %s " ,
vg - > status & SHARED ? " yes " : " no " ) ;
}
log_print ( " MAX LV %u " , vg - > max_lv ) ;
log_print ( " Cur LV %u " , vg - > lv_count ) ;
/****** FIXME Open LVs
log_print ( " Open LV %u " , vg - > lv_open ) ;
* * * * * * */
/****** FIXME Max LV Size
log_print ( " MAX LV Size %s " ,
( s1 = display_size ( LVM_LV_SIZE_MAX ( vg ) / 2 , SIZE_SHORT ) ) ) ;
free ( s1 ) ;
* * * * * * * * */
log_print ( " Max PV %u " , vg - > max_pv ) ;
log_print ( " Cur PV %u " , vg - > pv_count ) ;
/******* FIXME act PVs
log_print ( " Act PV %u " , vg - > pv_act ) ;
* * * * * * * * */
s1 = display_size ( vg - > extent_count * vg - > extent_size / 2 , SIZE_SHORT ) ;
log_print ( " VG Size %s " , s1 ) ;
dbg_free ( s1 ) ;
s1 = display_size ( vg - > extent_size / 2 , SIZE_SHORT ) ;
log_print ( " PE Size %s " , s1 ) ;
dbg_free ( s1 ) ;
log_print ( " Total PE %u " , vg - > extent_count ) ;
s1 =
display_size ( ( vg - > extent_count - vg - > free_count ) *
vg - > extent_size / 2 , SIZE_SHORT ) ;
log_print ( " Alloc PE / Size %u / %s " ,
vg - > extent_count - vg - > free_count , s1 ) ;
dbg_free ( s1 ) ;
s1 = display_size ( vg - > free_count * vg - > extent_size / 2 , SIZE_SHORT ) ;
log_print ( " Free PE / Size %u / %s " , vg - > free_count , s1 ) ;
dbg_free ( s1 ) ;
if ( strlen ( vg - > id . uuid ) )
s1 = display_uuid ( vg - > id . uuid ) ;
else
s1 = " none " ;
log_print ( " VG UUID %s " , s1 ) ;
if ( strlen ( vg - > id . uuid ) )
dbg_free ( s1 ) ;
log_print ( " " ) ;
return ;
}
void vgdisplay_colons ( struct volume_group * vg )
{
return ;
}
void vgdisplay_short ( struct volume_group * vg )
{
char * s1 , * s2 , * s3 ;
s1 = display_size ( vg - > extent_count * vg - > extent_size / 2 , SIZE_SHORT ) ;
s2 =
display_size ( ( vg - > extent_count - vg - > free_count ) * vg - > extent_size /
2 , SIZE_SHORT ) ;
s3 = display_size ( vg - > free_count * vg - > extent_size / 2 , SIZE_SHORT ) ;
2002-01-11 02:21:07 +03:00
log_print ( " %s %-9s [%-9s used / %s free] " , vg - > name ,
2001-11-19 18:20:50 +03:00
/********* FIXME if "open" print "/used" else print "/idle"??? ******/
s1 , s2 , s3 ) ;
dbg_free ( s1 ) ;
dbg_free ( s2 ) ;
dbg_free ( s3 ) ;
2001-11-13 20:53:06 +03:00
return ;
}