Decode FIFREEZE/FITHAW/FITRIM ioctls
The freeze/thaw ones are simple, but the trim is an interesting struct. * block.c (block_ioctl): Handle FIFREEZE/FITHAW/FITRIM. * ioctl.c (ioctl_decode): Pass 'X' ioctls to block_ioctl.
This commit is contained in:
parent
b2fa2beedc
commit
5b88608b29
20
block.c
20
block.c
@ -116,6 +116,11 @@ block_ioctl(struct tcb *tcp, long code, long arg)
|
||||
/* take a signed int */
|
||||
case BLKROSET:
|
||||
case BLKBSZSET:
|
||||
#ifdef FIFREEZE
|
||||
/* First seen in linux-2.6.29 */
|
||||
case FIFREEZE:
|
||||
case FITHAW:
|
||||
#endif
|
||||
if (entering(tcp)) {
|
||||
int val;
|
||||
if (umove(tcp, arg, &val) < 0)
|
||||
@ -263,6 +268,21 @@ block_ioctl(struct tcb *tcp, long code, long arg)
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef FITRIM
|
||||
/* First seen in linux-2.6.37 */
|
||||
case FITRIM:
|
||||
if (entering(tcp)) {
|
||||
struct fstrim_range fstrim;
|
||||
if (umove(tcp, arg, &fstrim))
|
||||
tprintf(", %#lx", arg);
|
||||
else
|
||||
tprintf(", {start=%#" PRIx64 ", len=%#" PRIx64 ", "
|
||||
"minlen=%#" PRIx64 "}", (uint64_t) fstrim.start,
|
||||
(uint64_t) fstrim.len, (uint64_t) fstrim.minlen);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
/* No arguments or unhandled */
|
||||
case BLKTRACESTART:
|
||||
case BLKTRACESTOP:
|
||||
|
Loading…
x
Reference in New Issue
Block a user