Merge branch 'testing' into unstable

This commit is contained in:
Greg Farnum 2010-11-02 10:10:24 -07:00
commit abb0b6d966
4 changed files with 26 additions and 13 deletions

View File

@ -373,17 +373,20 @@ void Client::update_inode_file_bits(Inode *in,
}
if (truncate_seq >= in->truncate_seq &&
in->truncate_size != truncate_size) {
dout(10) << "truncate_size " << in->truncate_size << " -> "
<< truncate_size << dendl;
assert(in->is_file());
in->truncate_size = truncate_size;
in->oset.truncate_size = truncate_size;
if (g_conf.client_oc && prior_size) { //do actual truncation
vector<ObjectExtent> ls;
filer->file_to_extents(in->ino, &in->layout,
truncate_size, prior_size - truncate_size,
ls);
objectcacher->truncate_set(&in->oset, ls);
if (in->is_file()) {
dout(10) << "truncate_size " << in->truncate_size << " -> "
<< truncate_size << dendl;
in->truncate_size = truncate_size;
in->oset.truncate_size = truncate_size;
if (g_conf.client_oc && prior_size) { //do actual truncation
vector<ObjectExtent> ls;
filer->file_to_extents(in->ino, &in->layout,
truncate_size, prior_size - truncate_size,
ls);
objectcacher->truncate_set(&in->oset, ls);
}
} else {
dout(0) << "Hmmm, truncate_seq && truncate_size changed on non-file inode!" << dendl;
}
}

View File

@ -513,7 +513,7 @@ class Inode {
Inode(vinodeno_t vino, ceph_file_layout *layout) :
ino(vino.ino), snapid(vino.snapid),
rdev(0), mode(0), uid(0), gid(0), nlink(0), size(0), truncate_seq(1), truncate_size(0),
rdev(0), mode(0), uid(0), gid(0), nlink(0), size(0), truncate_seq(1), truncate_size(-1),
time_warp_seq(0), max_size(0), version(0), xattr_version(0),
flags(0),
dir_hashed(false), dir_replicated(false), auth_cap(NULL),

View File

@ -1,4 +1,13 @@
/var/log/ceph/*.log /var/log/ceph/stat/*.log {
# Separate stat/*.log into a different rule because sometimes
# it doesn't exist, and logrotate will ignore the entire rule
# if any part of the file list isn't found.
/var/log/ceph/stat/*.log {
rotate 7
daily
compress
}
/var/log/ceph/*.log {
rotate 7
daily
compress

View File

@ -255,6 +255,7 @@ CInode *MDCache::create_system_inode(inodeno_t ino, int mode)
in->inode.ctime =
in->inode.mtime = g_clock.now();
in->inode.nlink = 1;
in->inode.truncate_size = -1ull;
if (in->inode.is_dir())
memset(&in->inode.layout, 0, sizeof(in->inode.layout));
else