Whamcloud - gitweb
remove the last vestiges of LLI_F_PREFER_EXTENDED_SIZE
authorphil <phil>
Sat, 26 Feb 2005 05:49:00 +0000 (05:49 +0000)
committerphil <phil>
Sat, 26 Feb 2005 05:49:00 +0000 (05:49 +0000)
lustre/include/linux/lustre_lite.h
lustre/liblustre/llite_lib.h
lustre/liblustre/super.c

index 97600ea..f659ef8 100644 (file)
@@ -66,7 +66,6 @@ extern struct file_operations ll_pgcache_seq_fops;
 #define LLI_INODE_DEAD                  0xdeadd00d
 #define LLI_F_HAVE_OST_SIZE_LOCK        0
 #define LLI_F_HAVE_MDS_SIZE_LOCK        1
-#define LLI_F_PREFER_EXTENDED_SIZE      2
 struct ll_inode_info {
         int                     lli_inode_magic;
         struct lov_stripe_md   *lli_smd;
index b6aeea2..4462311 100644 (file)
@@ -40,7 +40,6 @@ struct llu_sb_info
 
 #define LLI_F_HAVE_OST_SIZE_LOCK        0
 #define LLI_F_HAVE_MDS_SIZE_LOCK        1
-#define LLI_F_PREFER_EXTENDED_SIZE      2
 
 struct llu_inode_info {
         struct llu_sb_info     *lli_sbi;
index 1c08045..cc58ec5 100644 (file)
@@ -276,23 +276,6 @@ int llu_inode_getattr(struct inode *inode, struct lov_stripe_md *lsm)
         refresh_valid = OBD_MD_FLBLOCKS | OBD_MD_FLBLKSZ | OBD_MD_FLMTIME | 
                         OBD_MD_FLCTIME | OBD_MD_FLSIZE;
 
-        /* We set this flag in commit write as we extend the file size.  When
-         * the bit is set and the lock is canceled that covers the file size,
-         * we clear the bit.  This is enough to protect the window where our
-         * local size extension is needed for writeback.  However, it relies on
-         * behaviour that won't be true in the near future.  This assumes that
-         * all getattr callers get extent locks, which they currnetly do.  It
-         * also assumes that we only send discarding asts for {0,eof} truncates
-         * as is currently the case.  This will have to be replaced by the
-         * proper eoc communication between clients and the ost, which is on
-         * its way. */
-        if (test_bit(LLI_F_PREFER_EXTENDED_SIZE, &lli->lli_flags)) {
-                if (oa.o_size < lli->lli_st_size)
-                        refresh_valid &= ~OBD_MD_FLSIZE;
-                else 
-                        clear_bit(LLI_F_PREFER_EXTENDED_SIZE, &lli->lli_flags);
-        }
-
         obdo_refresh_inode(inode, &oa, refresh_valid);
 
         RETURN(0);