|
|
| version 1.5, 2006/10/04 15:37:52 | version 1.6, 2007/02/01 19:16:27 |
|---|---|
| Line 254 HsmDeleteFsysContext( | Line 254 HsmDeleteFsysContext( |
| extern int | extern int |
| HsmEstimateFileSpace( | HsmEstimateFileSpace( |
| hsm_fs_ctxt_t *contextp, | hsm_fs_ctxt_t *fscontextp, |
| hsm_f_ctxt_t *fcontextp, | |
| const xfs_bstat_t *statp, | const xfs_bstat_t *statp, |
| off64_t *bytes, | off64_t *bytes, |
| int accurate) | int accurate) |
| Line 262 const xfs_bstat_t *statp, | Line 263 const xfs_bstat_t *statp, |
| /* If the estimate needs to be accurate, then we'll have to | /* If the estimate needs to be accurate, then we'll have to |
| * pay the price and read the DMF attribute, if there is one, | * pay the price and read the DMF attribute, if there is one, |
| * to determine exactly what DMF state the file is in. Otherwise, | * to determine exactly what DMF state the file is in. Otherwise, |
| * make a guess based on information in the bstat. | * make a guess based on information in the bstat. If a |
| * hsm_f_ctxt_t was provided, an accurate estimate is free. | |
| */ | */ |
| if (accurate) { | if (fcontextp) { |
| dmf_fs_ctxt_t *dmf_fs_ctxtp = (dmf_fs_ctxt_t *)contextp; | dmf_f_ctxt_t *dmf_f_ctxt = (dmf_f_ctxt_t *)fcontextp; |
| if (dmf_f_ctxt->candidate) { | |
| *bytes = 0; /* treat the entire file as offline */ | |
| return 1; | |
| } else { | |
| return 0; | |
| } | |
| } else if (accurate) { | |
| dmf_fs_ctxt_t *dmf_fs_ctxtp = (dmf_fs_ctxt_t *)fscontextp; | |
| dmf_f_ctxt_t dmf_f_ctxt; | dmf_f_ctxt_t dmf_f_ctxt; |
| /* This is an implicit HsmAllocateFileContext call. */ | /* This is an implicit HsmAllocateFileContext call. */ |