Whamcloud - gitweb
LU-6557 llite: remove unused ll_max_rw_chunk
[fs/lustre-release.git] / lustre / llite / llite_internal.h
index 36be655..c839528 100644 (file)
@@ -212,7 +212,6 @@ struct ll_inode_info {
                struct {
                        struct mutex                    lli_size_mutex;
                        char                           *lli_symlink_name;
-                       __u64                           lli_maxbytes;
                        /*
                         * struct rw_semaphore {
                         *    signed long       count;     // align d.d_def_acl
@@ -253,7 +252,6 @@ struct ll_inode_info {
          *      In the future, if more members are added only for directory,
          *      some of the following members can be moved into u.f.
          */
-       bool                            lli_has_smd;
        struct cl_object                *lli_clob;
 
        /* mutex to request for layout lock exclusively. */
@@ -523,9 +521,6 @@ struct ll_sb_info {
         unsigned int              ll_namelen;
         struct file_operations   *ll_fop;
 
-        /* =0 - hold lock over whole read/write
-         * >0 - max. chunk to be read/written w/o lock re-acquiring */
-        unsigned long             ll_max_rw_chunk;
        unsigned int              ll_md_brw_pages; /* readdir pages per RPC */
 
         struct lu_site           *ll_site;
@@ -560,8 +555,6 @@ struct ll_sb_info {
        struct root_squash_info   ll_squash;
 };
 
-#define LL_DEFAULT_MAX_RW_CHUNK      (32 * 1024 * 1024)
-
 /*
  * per file-descriptor read-ahead data.
  */
@@ -910,8 +903,6 @@ int ll_obd_statfs(struct inode *inode, void __user *arg);
 int ll_get_max_mdsize(struct ll_sb_info *sbi, int *max_mdsize);
 int ll_get_default_mdsize(struct ll_sb_info *sbi, int *default_mdsize);
 int ll_set_default_mdsize(struct ll_sb_info *sbi, int default_mdsize);
-int ll_get_max_cookiesize(struct ll_sb_info *sbi, int *max_cookiesize);
-int ll_get_default_cookiesize(struct ll_sb_info *sbi, int *default_cookiesize);
 int ll_process_config(struct lustre_cfg *lcfg);
 
 enum {
@@ -1095,9 +1086,14 @@ static inline struct lu_fid *ll_inode2fid(struct inode *inode)
         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 */
@@ -1477,22 +1473,6 @@ static inline void d_lustre_revalidate(struct dentry *dentry)
        spin_unlock(&dentry->d_lock);
 }
 
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0)
-/* Compatibility for old (1.8) compiled userspace quota code */
-struct if_quotactl_18 {
-       __u32                   qc_cmd;
-       __u32                   qc_type;
-       __u32                   qc_id;
-       __u32                   qc_stat;
-       struct obd_dqinfo       qc_dqinfo;
-       struct obd_dqblk        qc_dqblk;
-       char                    obd_type[16];
-       struct obd_uuid         obd_uuid;
-};
-#define LL_IOC_QUOTACTL_18              _IOWR('f', 162, struct if_quotactl_18 *)
-/* End compatibility for old (1.8) compiled userspace quota code */
-#endif /* LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 7, 53, 0) */
-
 int ll_layout_conf(struct inode *inode, const struct cl_object_conf *conf);
 int ll_layout_refresh(struct inode *inode, __u32 *gen);
 int ll_layout_restore(struct inode *inode, loff_t start, __u64 length);
@@ -1516,7 +1496,6 @@ extern int cl_inode_fini_refcheck;
 
 int cl_file_inode_init(struct inode *inode, struct lustre_md *md);
 void cl_inode_fini(struct inode *inode);
-int cl_local_size(struct inode *inode);
 
 u64 cl_fid_build_ino(const struct lu_fid *fid, int api32);
 u32 cl_fid_build_gen(const struct lu_fid *fid);