Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Feb 2010
[XFS] How yo use real-time subvolume
I created filesystem XFS on partition hda8 with subvolume real-time on partition hda5:
mkfs.xfs -r rtdev=/dev/hda5 /dev/hda8
mount -t xfs -o rtdev=/dev/hda5 /dev/hda8 /xfs
in manual it is writen:
The realtime section is used to store the data of realtime files.These files had an attribute bit set through xfsctl(3) after file creation, before any data was written to the file.
I'm not sure whether I understand your question right, but from my reading of the manpage, the following should be a kind of a solution:
int fd, err; struct fsxattr attr; fd = open ("file", O_READ); /* Get the current extended file attributes. */ err = xfsctl ("file", fd, XFS_IOC_FSGETXATTR, (void *) &attr); /* Set the realtime bit. */ attr.fsx_xflags |= XFS_XFLAG_REALTIME; /* Apply new attributes. */ err = xfsctl ("file", fd, XFS_IOC_FSSETXATTR, (void *) &attr);
Last edited by unlimitedscolobb; 02-25-2010 at 07:16 AM. Reason: Added disclaimer
- Join Date
- May 2006
Huh. I wonder if the caveat at the bottom of the xfs_rtcp(8) manpage still applies...
Currently, realtime partitions are not supported under the Linux version of XFS, and use of a realtime partition WILL CAUSE CORRUPTION on the data partition. As such, this command is made available for curious DEVELOPERS ONLY at this point in time.