diff options
author | Charles Manning <cdhmanning@gmail.com> | 2010-09-09 09:20:23 +1200 |
---|---|---|
committer | Charles Manning <cdhmanning@gmail.com> | 2010-09-09 09:20:23 +1200 |
commit | de6470acd795b2daab5372dd4a9edce3f186afea (patch) | |
tree | 0e136a0e66b52ba05f8804d25fc8bce94de0ace2 /yaffs_nameval.c | |
parent | 0035e396dc2b872289b8e6320ced59e2eea81962 (diff) |
yaffs: Cache object xattrib state.
We cache whether or not an object has xattributes.
This is done to get around the problem of the Linux VFS trying to check security
capabilities on every write. Assuming that most files don't have security
attributes, this code will save on a huge amount of reads and make writing
faster.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
Diffstat (limited to 'yaffs_nameval.c')
-rw-r--r-- | yaffs_nameval.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/yaffs_nameval.c b/yaffs_nameval.c index 4b28513..2081f21 100644 --- a/yaffs_nameval.c +++ b/yaffs_nameval.c @@ -190,6 +190,7 @@ int nval_list(const char *xb, int xb_size, char *buf, int bsize) return ncopied; } +#if 0 int nval_load(char *xb, int xb_size, const char *src, int src_size) { int tx_size; @@ -218,3 +219,10 @@ int nval_save(const char *xb, int xb_size, char *dest, int dest_size) memcpy(dest,xb,tx_size); return tx_size; } +#endif + + +int nval_hasvalues(const char *xb, int xb_size) +{ + return nval_used(xb, xb_size) > 0; +} |