diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /fs/xfs/xfs_dir2_block.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'fs/xfs/xfs_dir2_block.c')
-rw-r--r-- | fs/xfs/xfs_dir2_block.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/fs/xfs/xfs_dir2_block.c b/fs/xfs/xfs_dir2_block.c index ab52e9e1c1ee..779a267b0a84 100644 --- a/fs/xfs/xfs_dir2_block.c +++ b/fs/xfs/xfs_dir2_block.c | |||
@@ -36,8 +36,8 @@ | |||
36 | #include "xfs_dir2_data.h" | 36 | #include "xfs_dir2_data.h" |
37 | #include "xfs_dir2_leaf.h" | 37 | #include "xfs_dir2_leaf.h" |
38 | #include "xfs_dir2_block.h" | 38 | #include "xfs_dir2_block.h" |
39 | #include "xfs_dir2_trace.h" | ||
40 | #include "xfs_error.h" | 39 | #include "xfs_error.h" |
40 | #include "xfs_trace.h" | ||
41 | 41 | ||
42 | /* | 42 | /* |
43 | * Local function prototypes. | 43 | * Local function prototypes. |
@@ -57,8 +57,8 @@ static xfs_dahash_t xfs_dir_hash_dot, xfs_dir_hash_dotdot; | |||
57 | void | 57 | void |
58 | xfs_dir_startup(void) | 58 | xfs_dir_startup(void) |
59 | { | 59 | { |
60 | xfs_dir_hash_dot = xfs_da_hashname(".", 1); | 60 | xfs_dir_hash_dot = xfs_da_hashname((unsigned char *)".", 1); |
61 | xfs_dir_hash_dotdot = xfs_da_hashname("..", 2); | 61 | xfs_dir_hash_dotdot = xfs_da_hashname((unsigned char *)"..", 2); |
62 | } | 62 | } |
63 | 63 | ||
64 | /* | 64 | /* |
@@ -94,7 +94,8 @@ xfs_dir2_block_addname( | |||
94 | __be16 *tagp; /* pointer to tag value */ | 94 | __be16 *tagp; /* pointer to tag value */ |
95 | xfs_trans_t *tp; /* transaction structure */ | 95 | xfs_trans_t *tp; /* transaction structure */ |
96 | 96 | ||
97 | xfs_dir2_trace_args("block_addname", args); | 97 | trace_xfs_dir2_block_addname(args); |
98 | |||
98 | dp = args->dp; | 99 | dp = args->dp; |
99 | tp = args->trans; | 100 | tp = args->trans; |
100 | mp = dp->i_mount; | 101 | mp = dp->i_mount; |
@@ -512,8 +513,9 @@ xfs_dir2_block_getdents( | |||
512 | /* | 513 | /* |
513 | * If it didn't fit, set the final offset to here & return. | 514 | * If it didn't fit, set the final offset to here & return. |
514 | */ | 515 | */ |
515 | if (filldir(dirent, dep->name, dep->namelen, cook & 0x7fffffff, | 516 | if (filldir(dirent, (char *)dep->name, dep->namelen, |
516 | be64_to_cpu(dep->inumber), DT_UNKNOWN)) { | 517 | cook & 0x7fffffff, be64_to_cpu(dep->inumber), |
518 | DT_UNKNOWN)) { | ||
517 | *offset = cook & 0x7fffffff; | 519 | *offset = cook & 0x7fffffff; |
518 | xfs_da_brelse(NULL, bp); | 520 | xfs_da_brelse(NULL, bp); |
519 | return 0; | 521 | return 0; |
@@ -590,7 +592,8 @@ xfs_dir2_block_lookup( | |||
590 | int error; /* error return value */ | 592 | int error; /* error return value */ |
591 | xfs_mount_t *mp; /* filesystem mount point */ | 593 | xfs_mount_t *mp; /* filesystem mount point */ |
592 | 594 | ||
593 | xfs_dir2_trace_args("block_lookup", args); | 595 | trace_xfs_dir2_block_lookup(args); |
596 | |||
594 | /* | 597 | /* |
595 | * Get the buffer, look up the entry. | 598 | * Get the buffer, look up the entry. |
596 | * If not found (ENOENT) then return, have no buffer. | 599 | * If not found (ENOENT) then return, have no buffer. |
@@ -747,7 +750,8 @@ xfs_dir2_block_removename( | |||
747 | int size; /* shortform size */ | 750 | int size; /* shortform size */ |
748 | xfs_trans_t *tp; /* transaction pointer */ | 751 | xfs_trans_t *tp; /* transaction pointer */ |
749 | 752 | ||
750 | xfs_dir2_trace_args("block_removename", args); | 753 | trace_xfs_dir2_block_removename(args); |
754 | |||
751 | /* | 755 | /* |
752 | * Look up the entry in the block. Gets the buffer and entry index. | 756 | * Look up the entry in the block. Gets the buffer and entry index. |
753 | * It will always be there, the vnodeops level does a lookup first. | 757 | * It will always be there, the vnodeops level does a lookup first. |
@@ -823,7 +827,8 @@ xfs_dir2_block_replace( | |||
823 | int error; /* error return value */ | 827 | int error; /* error return value */ |
824 | xfs_mount_t *mp; /* filesystem mount point */ | 828 | xfs_mount_t *mp; /* filesystem mount point */ |
825 | 829 | ||
826 | xfs_dir2_trace_args("block_replace", args); | 830 | trace_xfs_dir2_block_replace(args); |
831 | |||
827 | /* | 832 | /* |
828 | * Lookup the entry in the directory. Get buffer and entry index. | 833 | * Lookup the entry in the directory. Get buffer and entry index. |
829 | * This will always succeed since the caller has already done a lookup. | 834 | * This will always succeed since the caller has already done a lookup. |
@@ -897,7 +902,8 @@ xfs_dir2_leaf_to_block( | |||
897 | int to; /* block/leaf to index */ | 902 | int to; /* block/leaf to index */ |
898 | xfs_trans_t *tp; /* transaction pointer */ | 903 | xfs_trans_t *tp; /* transaction pointer */ |
899 | 904 | ||
900 | xfs_dir2_trace_args_bb("leaf_to_block", args, lbp, dbp); | 905 | trace_xfs_dir2_leaf_to_block(args); |
906 | |||
901 | dp = args->dp; | 907 | dp = args->dp; |
902 | tp = args->trans; | 908 | tp = args->trans; |
903 | mp = dp->i_mount; | 909 | mp = dp->i_mount; |
@@ -1044,7 +1050,8 @@ xfs_dir2_sf_to_block( | |||
1044 | xfs_trans_t *tp; /* transaction pointer */ | 1050 | xfs_trans_t *tp; /* transaction pointer */ |
1045 | struct xfs_name name; | 1051 | struct xfs_name name; |
1046 | 1052 | ||
1047 | xfs_dir2_trace_args("sf_to_block", args); | 1053 | trace_xfs_dir2_sf_to_block(args); |
1054 | |||
1048 | dp = args->dp; | 1055 | dp = args->dp; |
1049 | tp = args->trans; | 1056 | tp = args->trans; |
1050 | mp = dp->i_mount; | 1057 | mp = dp->i_mount; |