aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/super.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-26 16:38:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-26 16:38:50 -0400
commitba5b56cb3e3d2cab73d4fee9a022bb69462a8cd9 (patch)
treeeda7ea059a41ae5d68e2ad5a36a87069187ef22a /fs/ceph/super.h
parent243dd2809a5edd2e0e3e62781083aa44049af37d (diff)
parentd79698da32b317e96216236f265a9b72b78ae568 (diff)
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: (23 commits) ceph: document unlocked d_parent accesses ceph: explicitly reference rename old_dentry parent dir in request ceph: document locking for ceph_set_dentry_offset ceph: avoid d_parent in ceph_dentry_hash; fix ceph_encode_fh() hashing bug ceph: protect d_parent access in ceph_d_revalidate ceph: protect access to d_parent ceph: handle racing calls to ceph_init_dentry ceph: set dir complete frag after adding capability rbd: set blk_queue request sizes to object size ceph: set up readahead size when rsize is not passed rbd: cancel watch request when releasing the device ceph: ignore lease mask ceph: fix ceph_lookup_open intent usage ceph: only link open operations to directory unsafe list if O_CREAT|O_TRUNC ceph: fix bad parent_inode calc in ceph_lookup_open ceph: avoid carrying Fw cap during write into page cache libceph: don't time out osd requests that haven't been received ceph: report f_bfree based on kb_avail rather than diffing. ceph: only queue capsnap if caps are dirty ceph: fix snap writeback when racing with writes ...
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r--fs/ceph/super.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h
index 30446b144e3d..a23eed526f05 100644
--- a/fs/ceph/super.h
+++ b/fs/ceph/super.h
@@ -543,13 +543,16 @@ extern void ceph_reservation_status(struct ceph_fs_client *client,
543/* 543/*
544 * we keep buffered readdir results attached to file->private_data 544 * we keep buffered readdir results attached to file->private_data
545 */ 545 */
546#define CEPH_F_SYNC 1
547#define CEPH_F_ATEND 2
548
546struct ceph_file_info { 549struct ceph_file_info {
547 int fmode; /* initialized on open */ 550 short fmode; /* initialized on open */
551 short flags; /* CEPH_F_* */
548 552
549 /* readdir: position within the dir */ 553 /* readdir: position within the dir */
550 u32 frag; 554 u32 frag;
551 struct ceph_mds_request *last_readdir; 555 struct ceph_mds_request *last_readdir;
552 int at_end;
553 556
554 /* readdir: position within a frag */ 557 /* readdir: position within a frag */
555 unsigned offset; /* offset of last chunk, adjusted for . and .. */ 558 unsigned offset; /* offset of last chunk, adjusted for . and .. */
@@ -789,6 +792,8 @@ extern const struct dentry_operations ceph_dentry_ops, ceph_snap_dentry_ops,
789 ceph_snapdir_dentry_ops; 792 ceph_snapdir_dentry_ops;
790 793
791extern int ceph_handle_notrace_create(struct inode *dir, struct dentry *dentry); 794extern int ceph_handle_notrace_create(struct inode *dir, struct dentry *dentry);
795extern int ceph_handle_snapdir(struct ceph_mds_request *req,
796 struct dentry *dentry, int err);
792extern struct dentry *ceph_finish_lookup(struct ceph_mds_request *req, 797extern struct dentry *ceph_finish_lookup(struct ceph_mds_request *req,
793 struct dentry *dentry, int err); 798 struct dentry *dentry, int err);
794 799
@@ -796,7 +801,8 @@ extern void ceph_dentry_lru_add(struct dentry *dn);
796extern void ceph_dentry_lru_touch(struct dentry *dn); 801extern void ceph_dentry_lru_touch(struct dentry *dn);
797extern void ceph_dentry_lru_del(struct dentry *dn); 802extern void ceph_dentry_lru_del(struct dentry *dn);
798extern void ceph_invalidate_dentry_lease(struct dentry *dentry); 803extern void ceph_invalidate_dentry_lease(struct dentry *dentry);
799extern unsigned ceph_dentry_hash(struct dentry *dn); 804extern unsigned ceph_dentry_hash(struct inode *dir, struct dentry *dn);
805extern struct inode *ceph_get_dentry_parent_inode(struct dentry *dentry);
800 806
801/* 807/*
802 * our d_ops vary depending on whether the inode is live, 808 * our d_ops vary depending on whether the inode is live,
@@ -819,14 +825,6 @@ extern int ceph_encode_locks(struct inode *i, struct ceph_pagelist *p,
819 int p_locks, int f_locks); 825 int p_locks, int f_locks);
820extern int lock_to_ceph_filelock(struct file_lock *fl, struct ceph_filelock *c); 826extern int lock_to_ceph_filelock(struct file_lock *fl, struct ceph_filelock *c);
821 827
822static inline struct inode *get_dentry_parent_inode(struct dentry *dentry)
823{
824 if (dentry && dentry->d_parent)
825 return dentry->d_parent->d_inode;
826
827 return NULL;
828}
829
830/* debugfs.c */ 828/* debugfs.c */
831extern int ceph_fs_debugfs_init(struct ceph_fs_client *client); 829extern int ceph_fs_debugfs_init(struct ceph_fs_client *client);
832extern void ceph_fs_debugfs_cleanup(struct ceph_fs_client *client); 830extern void ceph_fs_debugfs_cleanup(struct ceph_fs_client *client);