Hello,

The test case in previous mail doesn't work due to changes recently
pushed out. Here is the new test case.

Regards
YZ
---
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
        int fd;
        int ret;
        char buf[8192];

        fd = open(argv[1], O_RDWR | O_CREAT | O_EXCL, 0644);
        if (fd < 0) {
                perror("open");
                exit(1);
        }
        /* create inline extent */
        ret = pwrite(fd, buf, 1024 * 6 - 1, 4096);
        if (ret < 0) {
                perror("write");
                exit(1);
        }
        /* disable packing of data */
        ret = pwrite(fd, buf, 4096, 32768);
        if (ret < 0) {
                perror("write");
                exit(1);
        }
        /* drop file extents in range 0 ~ 8192 */
        ret = pwrite(fd, buf, 8192, 0);
        if (ret < 0) {
                perror("write");
                exit(1);
        }
        close(fd);
        return 0;
}

_______________________________________________
Btrfs-devel mailing list
[email protected]
http://oss.oracle.com/mailman/listinfo/btrfs-devel

Reply via email to