Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-11753 obdclass: lu_dirent record length missing '0'
[fs/lustre-release.git]
/
lustre
/
include
/
uapi
/
linux
/
lustre
/
lustre_idl.h
diff --git
a/lustre/include/uapi/linux/lustre/lustre_idl.h
b/lustre/include/uapi/linux/lustre/lustre_idl.h
index
1e18f32
..
069fe56
100644
(file)
--- a/
lustre/include/uapi/linux/lustre/lustre_idl.h
+++ b/
lustre/include/uapi/linux/lustre/lustre_idl.h
@@
-534,12
+534,15
@@
static inline size_t lu_dirent_calc_size(size_t namelen, __u16 attr)
if (attr & LUDA_TYPE) {
const size_t align = sizeof(struct luda_type) - 1;
if (attr & LUDA_TYPE) {
const size_t align = sizeof(struct luda_type) - 1;
- size = (sizeof(struct lu_dirent) + namelen + align) & ~align;
- size += sizeof(struct luda_type);
- } else
- size = sizeof(struct lu_dirent) + namelen;
- return (size + 7) & ~7;
+ size = (sizeof(struct lu_dirent) + namelen + 1 + align) &
+ ~align;
+ size += sizeof(struct luda_type);
+ } else {
+ size = sizeof(struct lu_dirent) + namelen + 1;
+ }
+
+ return (size + 7) & ~7;
}
#define MDS_DIR_END_OFF 0xfffffffffffffffeULL
}
#define MDS_DIR_END_OFF 0xfffffffffffffffeULL