Submit #2772 ยป 0001-sys-vfs-hammer-make-use-of-hammer_xlate_to_zone2.patch
sys/vfs/hammer/hammer_blockmap.c | ||
---|---|---|
* The bigblock might be reserved by another zone. If it is reserved
|
||
* by our zone we may have to move next_offset past the append_off.
|
||
*/
|
||
base_off = (next_offset &
|
||
(~HAMMER_LARGEBLOCK_MASK64 & ~HAMMER_OFF_ZONE_MASK)) |
|
||
HAMMER_ZONE_RAW_BUFFER;
|
||
base_off = hammer_xlate_to_zone2(next_offset &
|
||
~HAMMER_LARGEBLOCK_MASK64);
|
||
resv = RB_LOOKUP(hammer_res_rb_tree, &hmp->rb_resv_root, base_off);
|
||
if (resv) {
|
||
if (resv->zone != zone) {
|
||
... | ... | |
* The bigblock might be reserved by another zone. If it is reserved
|
||
* by our zone we may have to move next_offset past the append_off.
|
||
*/
|
||
base_off = (next_offset &
|
||
(~HAMMER_LARGEBLOCK_MASK64 & ~HAMMER_OFF_ZONE_MASK)) |
|
||
HAMMER_ZONE_RAW_BUFFER;
|
||
base_off = hammer_xlate_to_zone2(next_offset &
|
||
~HAMMER_LARGEBLOCK_MASK64);
|
||
resv = RB_LOOKUP(hammer_res_rb_tree, &hmp->rb_resv_root, base_off);
|
||
if (resv) {
|
||
if (resv->zone != zone) {
|
||
... | ... | |
goto failed;
|
||
}
|
||
base_off = (zone_offset &
|
||
(~HAMMER_LARGEBLOCK_MASK64 & ~HAMMER_OFF_ZONE_MASK)) |
|
||
HAMMER_ZONE_RAW_BUFFER;
|
||
base_off = hammer_xlate_to_zone2(zone_offset &
|
||
~HAMMER_LARGEBLOCK_MASK64);
|
||
resv = RB_LOOKUP(hammer_res_rb_tree, &hmp->rb_resv_root, base_off);
|
||
if (resv) {
|
||
if (resv->zone != zone) {
|
||
... | ... | |
* occuring.
|
||
*/
|
||
if (layer2->bytes_free == HAMMER_LARGEBLOCK_SIZE) {
|
||
base_off = (zone_offset & (~HAMMER_LARGEBLOCK_MASK64 & ~HAMMER_OFF_ZONE_MASK)) | HAMMER_ZONE_RAW_BUFFER;
|
||
base_off = hammer_xlate_to_zone2(zone_offset &
|
||
~HAMMER_LARGEBLOCK_MASK64);
|
||
hammer_reserve_setdelay_offset(hmp, base_off, zone, layer2);
|
||
if (layer2->bytes_free == HAMMER_LARGEBLOCK_SIZE) {
|
||
... | ... | |
if (*errorp)
|
||
goto failed;
|
||
if (layer2->zone == 0) {
|
||
base_off = (zone_offset & (~HAMMER_LARGEBLOCK_MASK64 & ~HAMMER_OFF_ZONE_MASK)) | HAMMER_ZONE_RAW_BUFFER;
|
||
base_off = hammer_xlate_to_zone2(zone_offset &
|
||
~HAMMER_LARGEBLOCK_MASK64);
|
||
resv = RB_LOOKUP(hammer_res_rb_tree, &hmp->rb_resv_root,
|
||
base_off);
|
||
KKASSERT(resv && resv->zone == zone);
|
sys/vfs/hammer/hammer_ondisk.c | ||
---|---|---|
* the mount is rw.
|
||
*/
|
||
buffer = RB_LOOKUP(hammer_buf_rb_tree, &hmp->rb_bufs_root,
|
||
(buf_offset & ~HAMMER_OFF_ZONE_MASK) |
|
||
HAMMER_ZONE_RAW_BUFFER);
|
||
hammer_xlate_to_zone2(buf_offset));
|
||
if (buffer) {
|
||
kprintf("HAMMER: recovered aliased %016jx\n",
|
||
(intmax_t)buf_offset);
|