Lines 262-291
extern size_t pgsz;
Link Here
|
262 |
/* file dumpers |
262 |
/* file dumpers |
263 |
*/ |
263 |
*/ |
264 |
static rv_t dump_dirs(ix_t strmix, |
264 |
static rv_t dump_dirs(ix_t strmix, |
265 |
xfs_bstat_t *bstatbufp, |
265 |
struct xfs_bstat *bstatbufp, |
266 |
size_t bstatbuflen, |
266 |
size_t bstatbuflen, |
267 |
void *inomap_contextp); |
267 |
void *inomap_contextp); |
268 |
static rv_t dump_dir(ix_t strmix, |
268 |
static rv_t dump_dir(ix_t strmix, |
269 |
jdm_fshandle_t *, |
269 |
jdm_fshandle_t *, |
270 |
int, |
270 |
int, |
271 |
xfs_bstat_t *); |
271 |
struct xfs_bstat *); |
272 |
static rv_t dump_file(void *, |
272 |
static rv_t dump_file(void *, |
273 |
jdm_fshandle_t *, |
273 |
jdm_fshandle_t *, |
274 |
int, |
274 |
int, |
275 |
xfs_bstat_t *); |
275 |
struct xfs_bstat *); |
276 |
static rv_t dump_file_reg(drive_t *drivep, |
276 |
static rv_t dump_file_reg(drive_t *drivep, |
277 |
context_t *contextp, |
277 |
context_t *contextp, |
278 |
content_inode_hdr_t *scwhdrp, |
278 |
content_inode_hdr_t *scwhdrp, |
279 |
jdm_fshandle_t *, |
279 |
jdm_fshandle_t *, |
280 |
xfs_bstat_t *, |
280 |
struct xfs_bstat *, |
281 |
bool_t *); |
281 |
bool_t *); |
282 |
static rv_t dump_file_spec(drive_t *drivep, |
282 |
static rv_t dump_file_spec(drive_t *drivep, |
283 |
context_t *contextp, |
283 |
context_t *contextp, |
284 |
jdm_fshandle_t *, |
284 |
jdm_fshandle_t *, |
285 |
xfs_bstat_t *); |
285 |
struct xfs_bstat *); |
286 |
static rv_t dump_filehdr(drive_t *drivep, |
286 |
static rv_t dump_filehdr(drive_t *drivep, |
287 |
context_t *contextp, |
287 |
context_t *contextp, |
288 |
xfs_bstat_t *, |
288 |
struct xfs_bstat *, |
289 |
off64_t, |
289 |
off64_t, |
290 |
int); |
290 |
int); |
291 |
static rv_t dump_extenthdr(drive_t *drivep, |
291 |
static rv_t dump_extenthdr(drive_t *drivep, |
Lines 296-313
static rv_t dump_extenthdr(drive_t *drivep,
Link Here
|
296 |
off64_t); |
296 |
off64_t); |
297 |
static rv_t dump_dirent(drive_t *drivep, |
297 |
static rv_t dump_dirent(drive_t *drivep, |
298 |
context_t *contextp, |
298 |
context_t *contextp, |
299 |
xfs_bstat_t *, |
299 |
struct xfs_bstat *, |
300 |
xfs_ino_t, |
300 |
xfs_ino_t, |
301 |
gen_t, |
301 |
gen_t, |
302 |
char *, |
302 |
char *, |
303 |
size_t); |
303 |
size_t); |
304 |
static rv_t init_extent_group_context(jdm_fshandle_t *, |
304 |
static rv_t init_extent_group_context(jdm_fshandle_t *, |
305 |
xfs_bstat_t *, |
305 |
struct xfs_bstat *, |
306 |
extent_group_context_t *); |
306 |
extent_group_context_t *); |
307 |
static void cleanup_extent_group_context(extent_group_context_t *); |
307 |
static void cleanup_extent_group_context(extent_group_context_t *); |
308 |
static rv_t dump_extent_group(drive_t *drivep, |
308 |
static rv_t dump_extent_group(drive_t *drivep, |
309 |
context_t *contextp, |
309 |
context_t *contextp, |
310 |
xfs_bstat_t *, |
310 |
struct xfs_bstat *, |
311 |
extent_group_context_t *, |
311 |
extent_group_context_t *, |
312 |
off64_t, |
312 |
off64_t, |
313 |
off64_t, |
313 |
off64_t, |
Lines 352-366
static bool_t check_complete_flags(void);
Link Here
|
352 |
static rv_t dump_extattrs(drive_t *drivep, |
352 |
static rv_t dump_extattrs(drive_t *drivep, |
353 |
context_t *contextp, |
353 |
context_t *contextp, |
354 |
jdm_fshandle_t *fshandlep, |
354 |
jdm_fshandle_t *fshandlep, |
355 |
xfs_bstat_t *statp); |
355 |
struct xfs_bstat *statp); |
356 |
static rv_t dump_extattr_list(drive_t *drivep, |
356 |
static rv_t dump_extattr_list(drive_t *drivep, |
357 |
context_t *contextp, |
357 |
context_t *contextp, |
358 |
jdm_fshandle_t *fshandlep, |
358 |
jdm_fshandle_t *fshandlep, |
359 |
xfs_bstat_t *statp, |
359 |
struct xfs_bstat *statp, |
360 |
attrlist_t *listp, |
360 |
attrlist_t *listp, |
361 |
int flag, |
361 |
int flag, |
362 |
bool_t *abortprp); |
362 |
bool_t *abortprp); |
363 |
static char *dump_extattr_buildrecord(xfs_bstat_t *statp, |
363 |
static char *dump_extattr_buildrecord(struct xfs_bstat *statp, |
364 |
char *dumpbufp, |
364 |
char *dumpbufp, |
365 |
char *dumpbufendp, |
365 |
char *dumpbufendp, |
366 |
char *namesrcp, |
366 |
char *namesrcp, |
Lines 369-375
static char *dump_extattr_buildrecord(xfs_bstat_t *statp,
Link Here
|
369 |
char **valuepp); |
369 |
char **valuepp); |
370 |
static rv_t dump_extattrhdr(drive_t *drivep, |
370 |
static rv_t dump_extattrhdr(drive_t *drivep, |
371 |
context_t *contextp, |
371 |
context_t *contextp, |
372 |
xfs_bstat_t *statp, |
372 |
struct xfs_bstat *statp, |
373 |
size_t recsz, |
373 |
size_t recsz, |
374 |
size_t valoff, |
374 |
size_t valoff, |
375 |
ix_t flags, |
375 |
ix_t flags, |
Lines 432-438
static jdm_fshandle_t *sc_fshandlep = 0;
Link Here
|
432 |
static int sc_fsfd = -1; |
432 |
static int sc_fsfd = -1; |
433 |
/* open file descriptor for root directory |
433 |
/* open file descriptor for root directory |
434 |
*/ |
434 |
*/ |
435 |
static xfs_bstat_t *sc_rootxfsstatp = 0; |
435 |
static struct xfs_bstat *sc_rootxfsstatp = 0; |
436 |
/* pointer to loaded bulkstat for root directory |
436 |
/* pointer to loaded bulkstat for root directory |
437 |
*/ |
437 |
*/ |
438 |
static startpt_t *sc_startptp = 0; |
438 |
static startpt_t *sc_startptp = 0; |
Lines 1382-1388
content_init(int argc,
Link Here
|
1382 |
} |
1382 |
} |
1383 |
|
1383 |
|
1384 |
/* figure out the ino for the root directory of the fs |
1384 |
/* figure out the ino for the root directory of the fs |
1385 |
* and get its xfs_bstat_t for inomap_build(). This could |
1385 |
* and get its struct xfs_bstat for inomap_build(). This could |
1386 |
* be a bind mount; don't ask for the mount point inode, |
1386 |
* be a bind mount; don't ask for the mount point inode, |
1387 |
* find the actual lowest inode number in the filesystem. |
1387 |
* find the actual lowest inode number in the filesystem. |
1388 |
*/ |
1388 |
*/ |
Lines 1390-1396
content_init(int argc,
Link Here
|
1390 |
stat64_t rootstat; |
1390 |
stat64_t rootstat; |
1391 |
xfs_ino_t lastino = 0; |
1391 |
xfs_ino_t lastino = 0; |
1392 |
int ocount = 0; |
1392 |
int ocount = 0; |
1393 |
xfs_fsop_bulkreq_t bulkreq; |
1393 |
struct xfs_fsop_bulkreq bulkreq; |
1394 |
|
1394 |
|
1395 |
/* Get the inode of the mount point */ |
1395 |
/* Get the inode of the mount point */ |
1396 |
rval = fstat64(sc_fsfd, &rootstat); |
1396 |
rval = fstat64(sc_fsfd, &rootstat); |
Lines 1401-1407
content_init(int argc,
Link Here
|
1401 |
return BOOL_FALSE; |
1401 |
return BOOL_FALSE; |
1402 |
} |
1402 |
} |
1403 |
sc_rootxfsstatp = |
1403 |
sc_rootxfsstatp = |
1404 |
(xfs_bstat_t *)calloc(1, sizeof(xfs_bstat_t)); |
1404 |
(struct xfs_bstat *)calloc(1, sizeof(struct xfs_bstat)); |
1405 |
assert(sc_rootxfsstatp); |
1405 |
assert(sc_rootxfsstatp); |
1406 |
|
1406 |
|
1407 |
/* Get the first valid (i.e. root) inode in this fs */ |
1407 |
/* Get the first valid (i.e. root) inode in this fs */ |
Lines 2119-2125
content_stream_dump(ix_t strmix)
Link Here
|
2119 |
bool_t empty_mediafile; |
2119 |
bool_t empty_mediafile; |
2120 |
time_t elapsed; |
2120 |
time_t elapsed; |
2121 |
inv_stmtoken_t inv_stmt; |
2121 |
inv_stmtoken_t inv_stmt; |
2122 |
xfs_bstat_t *bstatbufp; |
2122 |
struct xfs_bstat *bstatbufp; |
2123 |
const size_t bstatbuflen = BSTATBUFLEN; |
2123 |
const size_t bstatbuflen = BSTATBUFLEN; |
2124 |
int rval; |
2124 |
int rval; |
2125 |
rv_t rv; |
2125 |
rv_t rv; |
Lines 2130-2137
content_stream_dump(ix_t strmix)
Link Here
|
2130 |
|
2130 |
|
2131 |
/* allocate a buffer for use by bstat_iter |
2131 |
/* allocate a buffer for use by bstat_iter |
2132 |
*/ |
2132 |
*/ |
2133 |
bstatbufp = (xfs_bstat_t *)calloc(bstatbuflen, |
2133 |
bstatbufp = (struct xfs_bstat *)calloc(bstatbuflen, |
2134 |
sizeof(xfs_bstat_t)); |
2134 |
sizeof(struct xfs_bstat)); |
2135 |
assert(bstatbufp); |
2135 |
assert(bstatbufp); |
2136 |
|
2136 |
|
2137 |
/* allocate an inomap context */ |
2137 |
/* allocate an inomap context */ |
Lines 2806-2818
update_cc_Media_useterminatorpr(drive_t *drivep, context_t *contextp)
Link Here
|
2806 |
|
2806 |
|
2807 |
static rv_t |
2807 |
static rv_t |
2808 |
dump_dirs(ix_t strmix, |
2808 |
dump_dirs(ix_t strmix, |
2809 |
xfs_bstat_t *bstatbufp, |
2809 |
struct xfs_bstat *bstatbufp, |
2810 |
size_t bstatbuflen, |
2810 |
size_t bstatbuflen, |
2811 |
void *inomap_contextp) |
2811 |
void *inomap_contextp) |
2812 |
{ |
2812 |
{ |
2813 |
xfs_ino_t lastino; |
2813 |
xfs_ino_t lastino; |
2814 |
size_t bulkstatcallcnt; |
2814 |
size_t bulkstatcallcnt; |
2815 |
xfs_fsop_bulkreq_t bulkreq; |
2815 |
struct xfs_fsop_bulkreq bulkreq; |
2816 |
|
2816 |
|
2817 |
inomap_reset_context(inomap_contextp); |
2817 |
inomap_reset_context(inomap_contextp); |
2818 |
|
2818 |
|
Lines 2820-2827
dump_dirs(ix_t strmix,
Link Here
|
2820 |
*/ |
2820 |
*/ |
2821 |
lastino = 0; |
2821 |
lastino = 0; |
2822 |
for (bulkstatcallcnt = 0 ; ; bulkstatcallcnt++) { |
2822 |
for (bulkstatcallcnt = 0 ; ; bulkstatcallcnt++) { |
2823 |
xfs_bstat_t *p; |
2823 |
struct xfs_bstat *p; |
2824 |
xfs_bstat_t *endp; |
2824 |
struct xfs_bstat *endp; |
2825 |
__s32 buflenout; |
2825 |
__s32 buflenout; |
2826 |
int rval; |
2826 |
int rval; |
2827 |
|
2827 |
|
Lines 2928-2934
static rv_t
Link Here
|
2928 |
dump_dir(ix_t strmix, |
2928 |
dump_dir(ix_t strmix, |
2929 |
jdm_fshandle_t *fshandlep, |
2929 |
jdm_fshandle_t *fshandlep, |
2930 |
int fsfd, |
2930 |
int fsfd, |
2931 |
xfs_bstat_t *statp) |
2931 |
struct xfs_bstat *statp) |
2932 |
{ |
2932 |
{ |
2933 |
context_t *contextp = &sc_contextp[strmix]; |
2933 |
context_t *contextp = &sc_contextp[strmix]; |
2934 |
drive_t *drivep = drivepp[strmix]; |
2934 |
drive_t *drivep = drivepp[strmix]; |
Lines 3110-3116
dump_dir(ix_t strmix,
Link Here
|
3110 |
* if it's not there, we have to get it the slow way. |
3110 |
* if it's not there, we have to get it the slow way. |
3111 |
*/ |
3111 |
*/ |
3112 |
if (inomap_get_gen(NULL, p->d_ino, &gen)) { |
3112 |
if (inomap_get_gen(NULL, p->d_ino, &gen)) { |
3113 |
xfs_bstat_t statbuf; |
3113 |
struct xfs_bstat statbuf; |
3114 |
int scrval; |
3114 |
int scrval; |
3115 |
|
3115 |
|
3116 |
scrval = bigstat_one(fsfd, |
3116 |
scrval = bigstat_one(fsfd, |
Lines 3169-3175
static rv_t
Link Here
|
3169 |
dump_extattrs(drive_t *drivep, |
3169 |
dump_extattrs(drive_t *drivep, |
3170 |
context_t *contextp, |
3170 |
context_t *contextp, |
3171 |
jdm_fshandle_t *fshandlep, |
3171 |
jdm_fshandle_t *fshandlep, |
3172 |
xfs_bstat_t *statp) |
3172 |
struct xfs_bstat *statp) |
3173 |
{ |
3173 |
{ |
3174 |
ix_t pass; |
3174 |
ix_t pass; |
3175 |
int flag; |
3175 |
int flag; |
Lines 3269-3275
static rv_t
Link Here
|
3269 |
dump_extattr_list(drive_t *drivep, |
3269 |
dump_extattr_list(drive_t *drivep, |
3270 |
context_t *contextp, |
3270 |
context_t *contextp, |
3271 |
jdm_fshandle_t *fshandlep, |
3271 |
jdm_fshandle_t *fshandlep, |
3272 |
xfs_bstat_t *statp, |
3272 |
struct xfs_bstat *statp, |
3273 |
attrlist_t *listp, |
3273 |
attrlist_t *listp, |
3274 |
int flag, |
3274 |
int flag, |
3275 |
bool_t *abortprp) |
3275 |
bool_t *abortprp) |
Lines 3572-3578
dump_extattr_list(drive_t *drivep,
Link Here
|
3572 |
} |
3572 |
} |
3573 |
|
3573 |
|
3574 |
static char * |
3574 |
static char * |
3575 |
dump_extattr_buildrecord(xfs_bstat_t *statp, |
3575 |
dump_extattr_buildrecord(struct xfs_bstat *statp, |
3576 |
char *dumpbufp, |
3576 |
char *dumpbufp, |
3577 |
char *dumpbufendp, |
3577 |
char *dumpbufendp, |
3578 |
char *namesrcp, |
3578 |
char *namesrcp, |
Lines 3655-3661
dump_extattr_buildrecord(xfs_bstat_t *statp,
Link Here
|
3655 |
static rv_t |
3655 |
static rv_t |
3656 |
dump_extattrhdr(drive_t *drivep, |
3656 |
dump_extattrhdr(drive_t *drivep, |
3657 |
context_t *contextp, |
3657 |
context_t *contextp, |
3658 |
xfs_bstat_t *statp, |
3658 |
struct xfs_bstat *statp, |
3659 |
size_t recsz, |
3659 |
size_t recsz, |
3660 |
size_t valoff, |
3660 |
size_t valoff, |
3661 |
ix_t flags, |
3661 |
ix_t flags, |
Lines 3712-3718
static rv_t
Link Here
|
3712 |
dump_file(void *arg1, |
3712 |
dump_file(void *arg1, |
3713 |
jdm_fshandle_t *fshandlep, |
3713 |
jdm_fshandle_t *fshandlep, |
3714 |
int fsfd, |
3714 |
int fsfd, |
3715 |
xfs_bstat_t *statp) |
3715 |
struct xfs_bstat *statp) |
3716 |
{ |
3716 |
{ |
3717 |
ix_t strmix = (ix_t)arg1; |
3717 |
ix_t strmix = (ix_t)arg1; |
3718 |
context_t *contextp = &sc_contextp[strmix]; |
3718 |
context_t *contextp = &sc_contextp[strmix]; |
Lines 3942-3948
dump_file_reg(drive_t *drivep,
Link Here
|
3942 |
context_t *contextp, |
3942 |
context_t *contextp, |
3943 |
content_inode_hdr_t *scwhdrp, |
3943 |
content_inode_hdr_t *scwhdrp, |
3944 |
jdm_fshandle_t *fshandlep, |
3944 |
jdm_fshandle_t *fshandlep, |
3945 |
xfs_bstat_t *statp, |
3945 |
struct xfs_bstat *statp, |
3946 |
bool_t *file_skippedp) |
3946 |
bool_t *file_skippedp) |
3947 |
{ |
3947 |
{ |
3948 |
startpt_t *startptp = &scwhdrp->cih_startpt; |
3948 |
startpt_t *startptp = &scwhdrp->cih_startpt; |
Lines 4163-4169
static rv_t
Link Here
|
4163 |
dump_file_spec(drive_t *drivep, |
4163 |
dump_file_spec(drive_t *drivep, |
4164 |
context_t *contextp, |
4164 |
context_t *contextp, |
4165 |
jdm_fshandle_t *fshandlep, |
4165 |
jdm_fshandle_t *fshandlep, |
4166 |
xfs_bstat_t *statp) |
4166 |
struct xfs_bstat *statp) |
4167 |
{ |
4167 |
{ |
4168 |
int rval; |
4168 |
int rval; |
4169 |
rv_t rv; |
4169 |
rv_t rv; |
Lines 4277-4283
dump_file_spec(drive_t *drivep,
Link Here
|
4277 |
*/ |
4277 |
*/ |
4278 |
static rv_t |
4278 |
static rv_t |
4279 |
init_extent_group_context(jdm_fshandle_t *fshandlep, |
4279 |
init_extent_group_context(jdm_fshandle_t *fshandlep, |
4280 |
xfs_bstat_t *statp, |
4280 |
struct xfs_bstat *statp, |
4281 |
extent_group_context_t *gcp) |
4281 |
extent_group_context_t *gcp) |
4282 |
{ |
4282 |
{ |
4283 |
bool_t isrealtime; |
4283 |
bool_t isrealtime; |
Lines 4340-4346
cleanup_extent_group_context(extent_group_context_t *gcp)
Link Here
|
4340 |
static rv_t |
4340 |
static rv_t |
4341 |
dump_extent_group(drive_t *drivep, |
4341 |
dump_extent_group(drive_t *drivep, |
4342 |
context_t *contextp, |
4342 |
context_t *contextp, |
4343 |
xfs_bstat_t *statp, |
4343 |
struct xfs_bstat *statp, |
4344 |
extent_group_context_t *gcp, |
4344 |
extent_group_context_t *gcp, |
4345 |
off64_t maxcnt, |
4345 |
off64_t maxcnt, |
4346 |
off64_t stopoffset, |
4346 |
off64_t stopoffset, |
Lines 4932-4938
dump_extent_group(drive_t *drivep,
Link Here
|
4932 |
|
4932 |
|
4933 |
/* Note: assumes the pad fields in dst have been zeroed. */ |
4933 |
/* Note: assumes the pad fields in dst have been zeroed. */ |
4934 |
static void |
4934 |
static void |
4935 |
copy_xfs_bstat(bstat_t *dst, xfs_bstat_t *src) |
4935 |
copy_xfs_bstat(bstat_t *dst, struct xfs_bstat *src) |
4936 |
{ |
4936 |
{ |
4937 |
dst->bs_ino = src->bs_ino; |
4937 |
dst->bs_ino = src->bs_ino; |
4938 |
dst->bs_mode = src->bs_mode; |
4938 |
dst->bs_mode = src->bs_mode; |
Lines 4963-4969
copy_xfs_bstat(bstat_t *dst, xfs_bstat_t *src)
Link Here
|
4963 |
static rv_t |
4963 |
static rv_t |
4964 |
dump_filehdr(drive_t *drivep, |
4964 |
dump_filehdr(drive_t *drivep, |
4965 |
context_t *contextp, |
4965 |
context_t *contextp, |
4966 |
xfs_bstat_t *statp, |
4966 |
struct xfs_bstat *statp, |
4967 |
off64_t offset, |
4967 |
off64_t offset, |
4968 |
int flags) |
4968 |
int flags) |
4969 |
{ |
4969 |
{ |
Lines 5086-5092
dump_extenthdr(drive_t *drivep,
Link Here
|
5086 |
static rv_t |
5086 |
static rv_t |
5087 |
dump_dirent(drive_t *drivep, |
5087 |
dump_dirent(drive_t *drivep, |
5088 |
context_t *contextp, |
5088 |
context_t *contextp, |
5089 |
xfs_bstat_t *statp, |
5089 |
struct xfs_bstat *statp, |
5090 |
xfs_ino_t ino, |
5090 |
xfs_ino_t ino, |
5091 |
gen_t gen, |
5091 |
gen_t gen, |
5092 |
char *name, |
5092 |
char *name, |