diff options
author | Karel Zak | 2009-05-29 21:46:00 +0200 |
---|---|---|
committer | Karel Zak | 2009-05-29 21:46:00 +0200 |
commit | d34ac93a61984a9144f832582aab99e0a70f4e3b (patch) | |
tree | dad9c7f1554c7e2948d3703be02a58befde6c890 /mount/loop.h | |
parent | mount: use TAG parsing function from libblkid (diff) | |
download | kernel-qcow2-util-linux-d34ac93a61984a9144f832582aab99e0a70f4e3b.tar.gz kernel-qcow2-util-linux-d34ac93a61984a9144f832582aab99e0a70f4e3b.tar.xz kernel-qcow2-util-linux-d34ac93a61984a9144f832582aab99e0a70f4e3b.zip |
losetup: add --set-capacity
The LOOP_SET_CAPACITY allows to resize loop device size.
Example:
# blockdev --getsize64 /dev/loop0
10485760
# dd if=/dev/zero of=/home/images/aaa.img count=10 bs=1M oflag=append conv=notrunc
# blockdev --getsize64 /dev/loop0
10485760
# ./losetup --set-capacity /dev/loop0
# blockdev --getsize64 /dev/loop0
20971520
CC: J. R. Okajima <hooanon05@yahoo.co.jp>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount/loop.h')
-rw-r--r-- | mount/loop.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mount/loop.h b/mount/loop.h index 606885297..64df33916 100644 --- a/mount/loop.h +++ b/mount/loop.h @@ -22,6 +22,8 @@ #define LOOP_GET_STATUS 0x4C03 #define LOOP_SET_STATUS64 0x4C04 #define LOOP_GET_STATUS64 0x4C05 +/* #define LOOP_CHANGE_FD 0x4C06 */ +#define LOOP_SET_CAPACITY 0x4C07 /* Flags for loop_into{64,}->lo_flags */ enum { |