From: Barry Naujok Date: Thu, 28 Jun 2007 16:00:13 +0000 (+0000) Subject: Add filestreams support to xfs_io X-Git-Tag: v2.10.0~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d5121ac6dd3a726d6d70b779766c653440d98ea;p=thirdparty%2Fxfsprogs-dev.git Add filestreams support to xfs_io Merge of master-melb:xfs-cmds:29015a by kenmcd. Update to 2.9.1 --- diff --git a/VERSION b/VERSION index fc566825b..fc4221ec1 100644 --- a/VERSION +++ b/VERSION @@ -3,5 +3,5 @@ # PKG_MAJOR=2 PKG_MINOR=9 -PKG_REVISION=0 +PKG_REVISION=1 PKG_BUILD=1 diff --git a/db/inode.c b/db/inode.c index 597464aed..39e70f05a 100644 --- a/db/inode.c +++ b/db/inode.c @@ -141,6 +141,9 @@ const field_t inode_core_flds[] = { { "nodefrag", FLDT_UINT1, OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_NODEFRAG_BIT-1),C1, 0, TYP_NONE }, + { "filestream", FLDT_UINT1, + OI(COFF(flags) + bitsz(__uint16_t) - XFS_DIFLAG_FILESTREAM_BIT-1),C1, + 0, TYP_NONE }, { "gen", FLDT_UINT32D, OI(COFF(gen)), C1, 0, TYP_NONE }, { NULL } }; diff --git a/doc/CHANGES b/doc/CHANGES index 948e06d8a..4bbc1ea32 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,3 +1,10 @@ +xfsprogs-2.9.1 (28 June 2007) + - Added filestreams support to xfs_io. + - Fix up libattr Makefile to append to LTLDFLAGS. Thanks to + Arfrever Frehtes Taifersar Arahesis for this. + - Fix up build not to ignore LDFLAGS generated by configure. + Thanks to SpanKY for this. + xfsprogs-2.9.0 (5 June 2007) - Added new tools: xfs_metadump and xfs_mdrestore. - Fix up the HAVE___U32 fix from 2.8.20 diff --git a/include/xfs_dinode.h b/include/xfs_dinode.h index 77d537782..bf4428d06 100644 --- a/include/xfs_dinode.h +++ b/include/xfs_dinode.h @@ -258,6 +258,7 @@ typedef enum xfs_dinode_fmt #define XFS_DIFLAG_EXTSIZE_BIT 11 /* inode extent size allocator hint */ #define XFS_DIFLAG_EXTSZINHERIT_BIT 12 /* inherit inode extent size */ #define XFS_DIFLAG_NODEFRAG_BIT 13 /* do not reorganize/defragment */ +#define XFS_DIFLAG_FILESTREAM_BIT 14 /* use filestream allocator */ #define XFS_DIFLAG_REALTIME (1 << XFS_DIFLAG_REALTIME_BIT) #define XFS_DIFLAG_PREALLOC (1 << XFS_DIFLAG_PREALLOC_BIT) #define XFS_DIFLAG_NEWRTBM (1 << XFS_DIFLAG_NEWRTBM_BIT) @@ -272,12 +273,13 @@ typedef enum xfs_dinode_fmt #define XFS_DIFLAG_EXTSIZE (1 << XFS_DIFLAG_EXTSIZE_BIT) #define XFS_DIFLAG_EXTSZINHERIT (1 << XFS_DIFLAG_EXTSZINHERIT_BIT) #define XFS_DIFLAG_NODEFRAG (1 << XFS_DIFLAG_NODEFRAG_BIT) +#define XFS_DIFLAG_FILESTREAM (1 << XFS_DIFLAG_FILESTREAM_BIT) #define XFS_DIFLAG_ANY \ (XFS_DIFLAG_REALTIME | XFS_DIFLAG_PREALLOC | XFS_DIFLAG_NEWRTBM | \ XFS_DIFLAG_IMMUTABLE | XFS_DIFLAG_APPEND | XFS_DIFLAG_SYNC | \ XFS_DIFLAG_NOATIME | XFS_DIFLAG_NODUMP | XFS_DIFLAG_RTINHERIT | \ XFS_DIFLAG_PROJINHERIT | XFS_DIFLAG_NOSYMLINKS | XFS_DIFLAG_EXTSIZE | \ - XFS_DIFLAG_EXTSZINHERIT | XFS_DIFLAG_NODEFRAG) + XFS_DIFLAG_EXTSZINHERIT | XFS_DIFLAG_NODEFRAG | XFS_DIFLAG_FILESTREAM) #endif /* __XFS_DINODE_H__ */ diff --git a/include/xfs_fs.h b/include/xfs_fs.h index b78f34d2c..4ee0ab88a 100644 --- a/include/xfs_fs.h +++ b/include/xfs_fs.h @@ -67,7 +67,8 @@ struct fsxattr { #define XFS_XFLAG_NOSYMLINKS 0x00000400 /* disallow symlink creation */ #define XFS_XFLAG_EXTSIZE 0x00000800 /* extent size allocator hint */ #define XFS_XFLAG_EXTSZINHERIT 0x00001000 /* inherit inode extent size */ -#define XFS_XFLAG_NODEFRAG 0x00002000 /* do not defragment */ +#define XFS_XFLAG_NODEFRAG 0x00002000 /* do not defragment */ +#define XFS_XFLAG_FILESTREAM 0x00004000 /* use filestream allocator */ #define XFS_XFLAG_HASATTR 0x80000000 /* no DIFLAG for this */ /* @@ -431,7 +432,7 @@ typedef struct xfs_handle { #define FSHSIZE sizeof(fsid_t) -/* +/* * Flags for going down operation */ #define XFS_FSOP_GOING_FLAGS_DEFAULT 0x0 /* going down */ diff --git a/io/attr.c b/io/attr.c index a2c6d55ec..727c460f4 100644 --- a/io/attr.c +++ b/io/attr.c @@ -46,10 +46,11 @@ static struct xflags { { XFS_XFLAG_NOSYMLINKS, "n", "nosymlinks" }, { XFS_XFLAG_EXTSIZE, "e", "extsize" }, { XFS_XFLAG_EXTSZINHERIT, "E", "extsz-inherit" }, - { XFS_XFLAG_NODEFRAG, "f", "no-defrag" }, + { XFS_XFLAG_NODEFRAG, "f", "no-defrag" }, + { XFS_XFLAG_FILESTREAM, "S", "filestream" }, { 0, NULL, NULL } }; -#define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEf" +#define CHATTR_XFLAG_LIST "r"/*p*/"iasAdtPneEfS" static void lsattr_help(void) @@ -72,6 +73,7 @@ lsattr_help(void) " e -- for non-realtime files, observe the inode extent size value\n" " E -- children created in this directory inherit the extent size value\n" " f -- do not include this file when defragmenting the filesystem\n" +" S -- enable filestreams allocator for this directory\n" "\n" " Options:\n" " -R -- recursively descend (useful when current file is a directory)\n" @@ -106,6 +108,7 @@ chattr_help(void) " +/-e -- set/clear the extent-size flag\n" " +/-E -- set/clear the extent-size inheritance flag\n" " +/-f -- set/clear the no-defrag flag\n" +" +/-S -- set/clear the filestreams allocator flag\n" " Note1: user must have certain capabilities to modify immutable/append-only.\n" " Note2: immutable/append-only files cannot be deleted; removing these files\n" " requires the immutable/append-only flag to be cleared first.\n" diff --git a/man/man3/xfsctl.3 b/man/man3/xfsctl.3 index e88339978..d0fe7f904 100644 --- a/man/man3/xfsctl.3 +++ b/man/man3/xfsctl.3 @@ -204,7 +204,7 @@ the directory will inherit the parents project ID. New directories also inherit the project inheritance bit. .TP .SM "Bit 10 (0x400) \- XFS_XFLAG_NOSYMLINKS" -Can only be set on a directory and disallows creation of +Can only be set on a directory and disallows creation of symbolic links in that directory. .TP .SM "Bit 11 (0x800) \- XFS_XFLAG_EXTSIZE" @@ -222,10 +222,18 @@ below). Can only be set on a directory. .TP .SM "Bit 13 (0x2000) \- XFS_XFLAG_NODEFRAG" -The file should be skipped during a defragment operation. When -applied to a directory, new files and directories created will +No defragment file bit - the file should be skipped during a defragmentation +operation. When applied to a directory, new files and directories created will inherit the no\-defrag bit. .TP +.SM "Bit 14 (0x4000) \- XFS_XFLAG_FILESTREAM" +Filestream allocator bit - allows a directory to reserve an allocation +group for exclusive use by files created within that directory. Files +being written in other directories will not use the same allocation +group and so files within different directories will not interleave +extents on disk. The reservation is only active while files are being +created and written into the directory. +.TP .SM "Bit 31 (0x80000000) \- XFS_XFLAG_HASATTR" The file has extended attributes associated with it. .RE @@ -375,7 +383,7 @@ removed from the file. The file size does not change. .\" .B biosz_flags .\" field will be set to 1 if the current read or write value has been .\" explicitly set. -.\" +.\" .\" .TP .\" .B XFS_IOC_SETBIOSIZE .\" This command sets information about the preferred buffered I/O size @@ -389,7 +397,7 @@ removed from the file. The file size does not change. .\" synchronous I/Os or if only a small amount of the file is accessed .\" using small random I/Os, resulting in little or no use of the .\" additional data read in near the random I/Os. -.\" +.\" .\" To explicitly set the preferred I/O sizes, the .\" .B biosz_flags .\" field should be set to zero and the @@ -408,7 +416,7 @@ removed from the file. The file size does not change. .\" and .\" .B dfl_biosz_write .\" fields are ignored. -.\" +.\" .\" If biosizes have already been explicitly set due to a prior use .\" of .\" .BR XFS_IOC_SETBIOSIZE , @@ -420,13 +428,13 @@ removed from the file. The file size does not change. .\" .B biosz_flags .\" is set to 1, the system will use the new values .\" regardless of whether the new sizes are larger or smaller than the old. -.\" +.\" .\" To reset the biosize values to the defaults for the filesystem .\" that the file resides in, the .\" .B biosz_flags .\" field should be set to 2. .\" The remainder of the fields will be ignored in that case. -.\" +.\" .\" Changes made by .\" .B XFS_IOC_SETBIOSIZE .\" are transient.