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-5814 llite: add cl_object_maxbytes()
[fs/lustre-release.git]
/
lustre
/
llite
/
llite_internal.h
diff --git
a/lustre/llite/llite_internal.h
b/lustre/llite/llite_internal.h
index
2048730
..
a1e9f80
100644
(file)
--- a/
lustre/llite/llite_internal.h
+++ b/
lustre/llite/llite_internal.h
@@
-212,7
+212,6
@@
struct ll_inode_info {
struct {
struct mutex lli_size_mutex;
char *lli_symlink_name;
struct {
struct mutex lli_size_mutex;
char *lli_symlink_name;
- __u64 lli_maxbytes;
/*
* struct rw_semaphore {
* signed long count; // align d.d_def_acl
/*
* struct rw_semaphore {
* signed long count; // align d.d_def_acl
@@
-1094,9
+1093,14
@@
static inline struct lu_fid *ll_inode2fid(struct inode *inode)
return fid;
}
return fid;
}
-static inline
__u64
ll_file_maxbytes(struct inode *inode)
+static inline
loff_t
ll_file_maxbytes(struct inode *inode)
{
{
- return ll_i2info(inode)->lli_maxbytes;
+ struct cl_object *obj = ll_i2info(inode)->lli_clob;
+
+ if (obj == NULL)
+ return MAX_LFS_FILESIZE;
+
+ return min_t(loff_t, cl_object_maxbytes(obj), MAX_LFS_FILESIZE);
}
/* llite/xattr.c */
}
/* llite/xattr.c */