projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
020c4bd
)
ceph: fscache: Update object store limit after file writing
author
Yunchuan Wen
<
[email protected]
>
Thu, 26 Dec 2013 14:29:27 +0000
(06:29 -0800)
committer
Yan, Zheng
<
[email protected]
>
Thu, 3 Apr 2014 02:33:53 +0000
(10:33 +0800)
Synchronize object->store_limit[_l] with new inode->i_size after file writing.
Tested-by: Milosz Tanski <
[email protected]
>
Signed-off-by: Yunchuan Wen <
[email protected]
>
Signed-off-by: Min Chen <
[email protected]
>
Signed-off-by: Li Wang <
[email protected]
>
fs/ceph/file.c
patch
|
blob
|
history
diff --git
a/fs/ceph/file.c
b/fs/ceph/file.c
index c298a7b8a1ce745363c62f686196e6859d3d7b30..2862a75fb9498ff8774f28cde4eb843d2b8cf658 100644
(file)
--- a/
fs/ceph/file.c
+++ b/
fs/ceph/file.c
@@
-970,6
+970,7
@@
retry_snap:
goto retry_snap;
}
} else {
+ loff_t old_size = inode->i_size;
/*
* No need to acquire the i_truncate_mutex. Because
* the MDS revokes Fwb caps before sending truncate
@@
-980,6
+981,8
@@
retry_snap:
written = generic_file_buffered_write(iocb, iov, nr_segs,
pos, &iocb->ki_pos,
count, 0);
+ if (inode->i_size > old_size)
+ ceph_fscache_update_objectsize(inode);
mutex_unlock(&inode->i_mutex);
}