Skip to content

Instantly share code, notes, and snippets.

@vstakhov
Created February 13, 2015 10:36
Show Gist options
  • Save vstakhov/976fa10d79d779333a09 to your computer and use it in GitHub Desktop.
Save vstakhov/976fa10d79d779333a09 to your computer and use it in GitHub Desktop.
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/stat.h>
#include <string.h>
#include <xfs/xfs.h>
int
main(void)
{
int fd;
const char *fname = "test_xfs";
struct fsxattr fsx;
memset(&fsx, 0, sizeof(fsx));
fsx.fsx_extsize = 65536;
fd = open(fname, O_CREAT | O_TRUNC | O_WRONLY, 00644);
return (xfsctl(fname, fd, XFS_IOC_FSSETXATTR, &fsx) == -1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment