[XFS] add a FMODE flag to make XFS invisible I/O less hacky

XFS has a mode called invisble I/O that doesn't update any of the
timestamps.  It's used for HSM-style applications and exposed through
the nasty open by handle ioctl.

Instead of doing directly assignment of file operations that set an
internal flag for it add a new FMODE_NOCMTIME flag that we can check
in the normal file operations.

(addition of the generic VFS flag has been ACKed by Al as an interims
 solution)

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
This commit is contained in:
Christoph Hellwig
2008-12-09 04:47:33 -05:00
committed by Lachlan McIlroy
parent 6d73cf133c
commit 4d4be482a4
7 changed files with 78 additions and 185 deletions

View File

@@ -81,6 +81,14 @@ extern int dir_notify_enable;
#define FMODE_WRITE_IOCTL ((__force fmode_t)128)
#define FMODE_NDELAY_NOW ((__force fmode_t)256)
/*
* Don't update ctime and mtime.
*
* Currently a special hack for the XFS open_by_handle ioctl, but we'll
* hopefully graduate it to a proper O_CMTIME flag supported by open(2) soon.
*/
#define FMODE_NOCMTIME ((__force fmode_t)2048)
#define RW_MASK 1
#define RWA_MASK 2
#define READ 0