diff options
Diffstat (limited to 'include/linux/nfs_fs.h')
-rw-r--r-- | include/linux/nfs_fs.h | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 8c29950d2fa5..52a1bdb4ee2b 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -38,6 +38,13 @@ | |||
38 | 38 | ||
39 | #ifdef __KERNEL__ | 39 | #ifdef __KERNEL__ |
40 | 40 | ||
41 | /* | ||
42 | * Enable dprintk() debugging support for nfs client. | ||
43 | */ | ||
44 | #ifdef CONFIG_NFS_DEBUG | ||
45 | # define NFS_DEBUG | ||
46 | #endif | ||
47 | |||
41 | #include <linux/in.h> | 48 | #include <linux/in.h> |
42 | #include <linux/mm.h> | 49 | #include <linux/mm.h> |
43 | #include <linux/pagemap.h> | 50 | #include <linux/pagemap.h> |
@@ -171,13 +178,9 @@ struct nfs_inode { | |||
171 | */ | 178 | */ |
172 | __be32 cookieverf[2]; | 179 | __be32 cookieverf[2]; |
173 | 180 | ||
174 | /* | ||
175 | * This is the list of dirty unwritten pages. | ||
176 | */ | ||
177 | struct radix_tree_root nfs_page_tree; | ||
178 | |||
179 | unsigned long npages; | 181 | unsigned long npages; |
180 | unsigned long ncommit; | 182 | unsigned long ncommit; |
183 | struct list_head commit_list; | ||
181 | 184 | ||
182 | /* Open contexts for shared mmap writes */ | 185 | /* Open contexts for shared mmap writes */ |
183 | struct list_head open_files; | 186 | struct list_head open_files; |
@@ -395,6 +398,29 @@ static inline void nfs_free_fhandle(const struct nfs_fh *fh) | |||
395 | kfree(fh); | 398 | kfree(fh); |
396 | } | 399 | } |
397 | 400 | ||
401 | #ifdef NFS_DEBUG | ||
402 | extern u32 _nfs_display_fhandle_hash(const struct nfs_fh *fh); | ||
403 | static inline u32 nfs_display_fhandle_hash(const struct nfs_fh *fh) | ||
404 | { | ||
405 | return _nfs_display_fhandle_hash(fh); | ||
406 | } | ||
407 | extern void _nfs_display_fhandle(const struct nfs_fh *fh, const char *caption); | ||
408 | #define nfs_display_fhandle(fh, caption) \ | ||
409 | do { \ | ||
410 | if (unlikely(nfs_debug & NFSDBG_FACILITY)) \ | ||
411 | _nfs_display_fhandle(fh, caption); \ | ||
412 | } while (0) | ||
413 | #else | ||
414 | static inline u32 nfs_display_fhandle_hash(const struct nfs_fh *fh) | ||
415 | { | ||
416 | return 0; | ||
417 | } | ||
418 | static inline void nfs_display_fhandle(const struct nfs_fh *fh, | ||
419 | const char *caption) | ||
420 | { | ||
421 | } | ||
422 | #endif | ||
423 | |||
398 | /* | 424 | /* |
399 | * linux/fs/nfs/nfsroot.c | 425 | * linux/fs/nfs/nfsroot.c |
400 | */ | 426 | */ |
@@ -632,19 +658,13 @@ nfs_fileid_to_ino_t(u64 fileid) | |||
632 | 658 | ||
633 | #ifdef __KERNEL__ | 659 | #ifdef __KERNEL__ |
634 | 660 | ||
635 | /* | ||
636 | * Enable debugging support for nfs client. | ||
637 | * Requires RPC_DEBUG. | ||
638 | */ | ||
639 | #ifdef RPC_DEBUG | ||
640 | # define NFS_DEBUG | ||
641 | #endif | ||
642 | |||
643 | # undef ifdebug | 661 | # undef ifdebug |
644 | # ifdef NFS_DEBUG | 662 | # ifdef NFS_DEBUG |
645 | # define ifdebug(fac) if (unlikely(nfs_debug & NFSDBG_##fac)) | 663 | # define ifdebug(fac) if (unlikely(nfs_debug & NFSDBG_##fac)) |
664 | # define NFS_IFDEBUG(x) x | ||
646 | # else | 665 | # else |
647 | # define ifdebug(fac) if (0) | 666 | # define ifdebug(fac) if (0) |
667 | # define NFS_IFDEBUG(x) | ||
648 | # endif | 668 | # endif |
649 | #endif /* __KERNEL */ | 669 | #endif /* __KERNEL */ |
650 | 670 | ||