Submit #2777 ยป 0001-hammer-some-trivial-fixes.patch
sbin/newfs_hammer/newfs_hammer.c | ||
---|---|---|
vol->vol_alloc += MemAreaSize;
|
||
/*
|
||
* The remaining area is the zone 2 buffer allocation area. These
|
||
* buffers
|
||
* The remaining area is the zone 2 buffer allocation area.
|
||
*/
|
||
ondisk->vol_buf_beg = vol->vol_alloc;
|
||
ondisk->vol_buf_end = vol->size & ~(int64_t)HAMMER_BUFMASK;
|
sys/vfs/hammer/hammer_blockmap.c | ||
---|---|---|
/*
|
||
* If we are allocating from the base of a new buffer we can avoid
|
||
* a disk read by calling hammer_bnew().
|
||
* a disk read by calling hammer_bnew_ext().
|
||
*/
|
||
if ((next_offset & HAMMER_BUFMASK) == 0) {
|
||
hammer_bnew_ext(trans->hmp, next_offset, bytes,
|
sys/vfs/hammer/hammer_ondisk.c | ||
---|---|---|
************************************************************************
|
||
*
|
||
* Load a HAMMER volume by name. Returns 0 on success or a positive error
|
||
* code on failure. Volumes must be loaded at mount time, get_volume() will
|
||
* not load a new volume.
|
||
* code on failure. Volumes must be loaded at mount time, hammer_get_volume()
|
||
* will not load a new volume.
|
||
*
|
||
* The passed devvp is vref()'d but not locked. This function consumes the
|
||
* ref (typically by associating it with the volume structure).
|
sys/vfs/hammer/hammer_volume.c | ||
---|---|---|
}
|
||
/*
|
||
*
|
||
* Reblock filesystem
|
||
*/
|
||
hmp->volume_to_remove = volume->vol_no;
|
||
struct hammer_ioc_reblock reblock;
|
||
... | ... | |
ondisk->vol_buf_end = vol_size & ~(int64_t)HAMMER_BUFMASK;
|
||
if (ondisk->vol_buf_end < ondisk->vol_buf_beg) {
|
||
kprintf("volume %d %s is too small to hold the volume header",
|
||
kprintf("volume %d %s is too small to hold the volume header\n",
|
||
ondisk->vol_no, ondisk->vol_name);
|
||
error = EFTYPE;
|
||
goto late_failure;
|