Restore sectorsize
global to unbreak makefs after r317744
This also unbreaks the fstyp tests. Reported by: Alastair Hogge <agh@fastmail.fm>, Jenkins Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
c53d56999c
commit
ca7f276c93
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=317967
@ -143,7 +143,7 @@ static void *ffs_build_dinode2(struct ufs2_dinode *, dirbuf_t *, fsnode *,
|
||||
fsnode *, fsinfo_t *);
|
||||
|
||||
|
||||
|
||||
int sectorsize; /* XXX: for buf.c::getblk() */
|
||||
/* publicly visible functions */
|
||||
|
||||
void
|
||||
@ -426,6 +426,8 @@ ffs_validate(const char *dir, fsnode *root, fsinfo_t *fsopts)
|
||||
printf("ffs_validate: dir %s; %lld bytes, %lld inodes\n",
|
||||
dir, (long long)fsopts->size, (long long)fsopts->inodes);
|
||||
}
|
||||
sectorsize = fsopts->sectorsize; /* XXX - see earlier */
|
||||
|
||||
/* now check calculated sizes vs requested sizes */
|
||||
if (fsopts->maxsize > 0 && fsopts->size > fsopts->maxsize) {
|
||||
errx(1, "`%s' size of %lld is larger than the maxsize of %lld.",
|
||||
|
@ -52,6 +52,8 @@ __FBSDID("$FreeBSD$");
|
||||
#include "makefs.h"
|
||||
#include "buf.h"
|
||||
|
||||
extern int sectorsize; /* XXX: from ffs.c & mkfs.c */
|
||||
|
||||
static TAILQ_HEAD(buftailhead,buf) buftail;
|
||||
|
||||
int
|
||||
@ -60,7 +62,6 @@ bread(struct vnode *vp, daddr_t blkno, int size, struct ucred *u1 __unused,
|
||||
{
|
||||
off_t offset;
|
||||
ssize_t rv;
|
||||
fsinfo_t *fs = vp->fs;
|
||||
|
||||
assert (bpp != NULL);
|
||||
|
||||
@ -68,7 +69,7 @@ bread(struct vnode *vp, daddr_t blkno, int size, struct ucred *u1 __unused,
|
||||
printf("%s: blkno %lld size %d\n", __func__, (long long)blkno,
|
||||
size);
|
||||
*bpp = getblk(vp, blkno, size, 0, 0, 0);
|
||||
offset = (*bpp)->b_blkno * fs->sectorsize;
|
||||
offset = (*bpp)->b_blkno * sectorsize; /* XXX */
|
||||
if (debug & DEBUG_BUF_BREAD)
|
||||
printf("%s: blkno %lld offset %lld bcount %ld\n", __func__,
|
||||
(long long)(*bpp)->b_blkno, (long long) offset,
|
||||
@ -125,10 +126,9 @@ bwrite(struct buf *bp)
|
||||
{
|
||||
off_t offset;
|
||||
ssize_t rv;
|
||||
fsinfo_t *fs = bp->b_fs;
|
||||
|
||||
assert (bp != NULL);
|
||||
offset = bp->b_blkno * fs->sectorsize;
|
||||
offset = bp->b_blkno * sectorsize; /* XXX */
|
||||
if (debug & DEBUG_BUF_BWRITE)
|
||||
printf("bwrite: blkno %lld offset %lld bcount %ld\n",
|
||||
(long long)bp->b_blkno, (long long) offset,
|
||||
|
Loading…
Reference in New Issue
Block a user