Lines Matching refs:capsnap
438 struct ceph_cap_snap *capsnap;
441 capsnap = kzalloc(sizeof(*capsnap), GFP_NOFS);
442 if (!capsnap) {
456 kfree(capsnap);
463 capsnap, snapc);
466 atomic_set(&capsnap->nref, 1);
467 capsnap->ci = ci;
468 INIT_LIST_HEAD(&capsnap->ci_item);
469 INIT_LIST_HEAD(&capsnap->flushing_item);
471 capsnap->follows = snapc->seq;
472 capsnap->issued = __ceph_caps_issued(ci, NULL);
473 capsnap->dirty = dirty;
475 capsnap->mode = inode->i_mode;
476 capsnap->uid = inode->i_uid;
477 capsnap->gid = inode->i_gid;
481 capsnap->xattr_blob =
483 capsnap->xattr_version = ci->i_xattrs.version;
485 capsnap->xattr_blob = NULL;
486 capsnap->xattr_version = 0;
492 capsnap->dirty_pages = ci->i_wrbuffer_ref_head;
494 capsnap->context = snapc;
498 list_add_tail(&capsnap->ci_item, &ci->i_cap_snaps);
503 capsnap, snapc, snapc->seq);
504 capsnap->writing = 1;
507 __ceph_finish_cap_snap(ci, capsnap);
511 kfree(capsnap);
521 * If capsnap can now be flushed, add to snap_flush list, and return 1.
526 struct ceph_cap_snap *capsnap)
531 BUG_ON(capsnap->writing);
532 capsnap->size = inode->i_size;
533 capsnap->mtime = inode->i_mtime;
534 capsnap->atime = inode->i_atime;
535 capsnap->ctime = inode->i_ctime;
536 capsnap->time_warp_seq = ci->i_time_warp_seq;
537 if (capsnap->dirty_pages) {
539 "still has %d dirty pages\n", inode, capsnap,
540 capsnap->context, capsnap->context->seq,
541 ceph_cap_string(capsnap->dirty), capsnap->size,
542 capsnap->dirty_pages);
546 inode, capsnap, capsnap->context,
547 capsnap->context->seq, ceph_cap_string(capsnap->dirty),
548 capsnap->size);