You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: ceph: keep reference to parent inode on ceph_dentry ceph: queue cap_snaps once per realm libceph: fix socket write error handling libceph: fix socket read error handling
This commit is contained in:
+4
-1
@@ -60,6 +60,7 @@ int ceph_init_dentry(struct dentry *dentry)
|
||||
}
|
||||
di->dentry = dentry;
|
||||
di->lease_session = NULL;
|
||||
di->parent_inode = igrab(dentry->d_parent->d_inode);
|
||||
dentry->d_fsdata = di;
|
||||
dentry->d_time = jiffies;
|
||||
ceph_dentry_lru_add(dentry);
|
||||
@@ -1033,7 +1034,7 @@ static void ceph_dentry_release(struct dentry *dentry)
|
||||
u64 snapid = CEPH_NOSNAP;
|
||||
|
||||
if (!IS_ROOT(dentry)) {
|
||||
parent_inode = dentry->d_parent->d_inode;
|
||||
parent_inode = di->parent_inode;
|
||||
if (parent_inode)
|
||||
snapid = ceph_snap(parent_inode);
|
||||
}
|
||||
@@ -1058,6 +1059,8 @@ static void ceph_dentry_release(struct dentry *dentry)
|
||||
kmem_cache_free(ceph_dentry_cachep, di);
|
||||
dentry->d_fsdata = NULL;
|
||||
}
|
||||
if (parent_inode)
|
||||
iput(parent_inode);
|
||||
}
|
||||
|
||||
static int ceph_snapdir_d_revalidate(struct dentry *dentry,
|
||||
|
||||
+10
-4
@@ -584,10 +584,14 @@ static void queue_realm_cap_snaps(struct ceph_snap_realm *realm)
|
||||
if (lastinode)
|
||||
iput(lastinode);
|
||||
|
||||
dout("queue_realm_cap_snaps %p %llx children\n", realm, realm->ino);
|
||||
list_for_each_entry(child, &realm->children, child_item)
|
||||
queue_realm_cap_snaps(child);
|
||||
list_for_each_entry(child, &realm->children, child_item) {
|
||||
dout("queue_realm_cap_snaps %p %llx queue child %p %llx\n",
|
||||
realm, realm->ino, child, child->ino);
|
||||
list_del_init(&child->dirty_item);
|
||||
list_add(&child->dirty_item, &realm->dirty_item);
|
||||
}
|
||||
|
||||
list_del_init(&realm->dirty_item);
|
||||
dout("queue_realm_cap_snaps %p %llx done\n", realm, realm->ino);
|
||||
}
|
||||
|
||||
@@ -683,7 +687,9 @@ more:
|
||||
* queue cap snaps _after_ we've built the new snap contexts,
|
||||
* so that i_head_snapc can be set appropriately.
|
||||
*/
|
||||
list_for_each_entry(realm, &dirty_realms, dirty_item) {
|
||||
while (!list_empty(&dirty_realms)) {
|
||||
realm = list_first_entry(&dirty_realms, struct ceph_snap_realm,
|
||||
dirty_item);
|
||||
queue_realm_cap_snaps(realm);
|
||||
}
|
||||
|
||||
|
||||
@@ -207,6 +207,7 @@ struct ceph_dentry_info {
|
||||
struct dentry *dentry;
|
||||
u64 time;
|
||||
u64 offset;
|
||||
struct inode *parent_inode;
|
||||
};
|
||||
|
||||
struct ceph_inode_xattrs_info {
|
||||
|
||||
Reference in New Issue
Block a user