
ABORTED trim command
By: a guest on
May 2nd, 2011 | syntax:
C | size: 0.65 KB | hits: 138 | expires: Never
#include <sys/ioctl.h>
#include <stdio.h>
#include <fcntl.h>
#include <sys/nata.h>
int main(){
off_t range[2];
range[0] =100000;
range[1] =65535;
printf("start:%llu offset:%llu\n",(unsigned long long) range[0],
(unsigned long long) range[1]);
int fd = open("/dev/ad4",O_RDWR|O_DIRECT);
ioctl(fd,IOCATADELETE, range);
// usleep(500000);
range[0] =0;
range[1] =65535;
printf("start:%llu offset:%llu\n",(unsigned long long) range[0],
(unsigned long long) range[1]);
ioctl(fd,IOCATADELETE, range);
close(fd);
}