Symbol: fs
bin/cp/utils.c
106
fs->st_mode & ~(S_ISTXT | S_ISUID | S_ISGID));
bin/cp/utils.c
123
if (fs->st_size <= 8 * 1048576) {
bin/cp/utils.c
124
if ((p = mmap(NULL, (size_t)fs->st_size, PROT_READ,
bin/cp/utils.c
129
madvise(p, fs->st_size, MADV_SEQUENTIAL);
bin/cp/utils.c
130
if (write(to_fd, p, fs->st_size) != fs->st_size) {
bin/cp/utils.c
135
if (munmap(p, fs->st_size) == -1) {
bin/cp/utils.c
172
if (pflag && setfile(fs, to_fd))
bin/cp/utils.c
181
fs->st_mode & (S_ISUID | S_ISGID) && fs->st_uid == myuid) {
bin/cp/utils.c
185
} else if (fs->st_gid == to_stat.st_gid &&
bin/cp/utils.c
186
fchmod(to_fd, fs->st_mode & RETAINBITS & ~myumask)) {
bin/cp/utils.c
275
setfile(struct stat *fs, int fd)
bin/cp/utils.c
281
fs->st_mode &= S_ISTXT | S_ISUID | S_ISGID | S_IRWXU | S_IRWXG | S_IRWXO;
bin/cp/utils.c
283
ts[0] = fs->st_atim;
bin/cp/utils.c
284
ts[1] = fs->st_mtim;
bin/cp/utils.c
296
if (fd >= 0 ? fchown(fd, fs->st_uid, fs->st_gid) :
bin/cp/utils.c
297
lchown(to.p_path, fs->st_uid, fs->st_gid)) {
bin/cp/utils.c
302
fs->st_mode &= ~(S_ISTXT | S_ISUID | S_ISGID);
bin/cp/utils.c
304
if (fd >= 0 ? fchmod(fd, fs->st_mode) :
bin/cp/utils.c
305
fchmodat(AT_FDCWD, to.p_path, fs->st_mode, AT_SYMLINK_NOFOLLOW)) {
bin/cp/utils.c
318
if (fd >= 0 ? fchflags(fd, fs->st_flags) :
bin/cp/utils.c
319
chflagsat(AT_FDCWD, to.p_path, fs->st_flags, AT_SYMLINK_NOFOLLOW))
bin/cp/utils.c
320
if (errno != EOPNOTSUPP || fs->st_flags != 0) {
bin/cp/utils.c
59
struct stat to_stat, *fs;
bin/cp/utils.c
82
fs = entp->fts_statp;
bin/df/ffs_df.c
50
struct fs iu_fs;
bin/ksh/var.c
364
const char *fs = NULL;
bin/ksh/var.c
385
fs = s = formatstr(vq, s);
bin/ksh/var.c
399
afree((void *)fs, ATEMP);
bin/mv/cp.c
396
struct stat *fs;
bin/mv/cp.c
419
fs = entp->fts_statp;
bin/mv/cp.c
450
fs->st_mode & ~(S_ISTXT | S_ISUID | S_ISGID));
bin/mv/cp.c
467
if (fs->st_size <= 8 * 1048576) {
bin/mv/cp.c
468
if ((p = mmap(NULL, (size_t)fs->st_size, PROT_READ,
bin/mv/cp.c
473
madvise(p, fs->st_size, MADV_SEQUENTIAL);
bin/mv/cp.c
474
if (write(to_fd, p, fs->st_size) != fs->st_size) {
bin/mv/cp.c
479
if (munmap(p, fs->st_size) == -1) {
bin/mv/cp.c
516
if (setfile(fs, to_fd))
bin/mv/cp.c
578
setfile(struct stat *fs, int fd)
bin/mv/cp.c
584
fs->st_mode &= S_ISTXT | S_ISUID | S_ISGID | S_IRWXU | S_IRWXG | S_IRWXO;
bin/mv/cp.c
586
ts[0] = fs->st_atim;
bin/mv/cp.c
587
ts[1] = fs->st_mtim;
bin/mv/cp.c
599
if (fd >= 0 ? fchown(fd, fs->st_uid, fs->st_gid) :
bin/mv/cp.c
600
lchown(to.p_path, fs->st_uid, fs->st_gid)) {
bin/mv/cp.c
605
fs->st_mode &= ~(S_ISTXT | S_ISUID | S_ISGID);
bin/mv/cp.c
607
if (fd >= 0 ? fchmod(fd, fs->st_mode) :
bin/mv/cp.c
608
fchmodat(AT_FDCWD, to.p_path, fs->st_mode, AT_SYMLINK_NOFOLLOW)) {
bin/mv/cp.c
621
if (fd >= 0 ? fchflags(fd, fs->st_flags) :
bin/mv/cp.c
622
chflagsat(AT_FDCWD, to.p_path, fs->st_flags, AT_SYMLINK_NOFOLLOW))
bin/mv/cp.c
623
if (errno != EOPNOTSUPP || fs->st_flags != 0) {
distrib/special/more/more.c
433
checkf(char *fs, int *clearfirst)
distrib/special/more/more.c
439
if (stat(fs, &stbuf) == -1) {
distrib/special/more/more.c
443
perror(fs);
distrib/special/more/more.c
447
printf("\n*** %s: directory ***\n\n", fs);
distrib/special/more/more.c
450
if ((f = Fopen(fs, "r")) == NULL) {
distrib/special/more/more.c
452
perror(fs);
distrib/special/more/more.c
455
if (magic(f, fs))
distrib/special/more/more.c
471
magic(FILE *f, char *fs)
distrib/special/more/more.c
489
fs);
games/backgammon/common_source/save.c
52
char *fs;
games/backgammon/common_source/save.c
66
fs = fname;
games/backgammon/common_source/save.c
69
if (fs > fname) {
games/backgammon/common_source/save.c
70
fs--;
games/backgammon/common_source/save.c
77
if (fs - fname < sizeof(fname) - 1) {
games/backgammon/common_source/save.c
79
*fs = i;
games/backgammon/common_source/save.c
80
addch(*fs++);
games/backgammon/common_source/save.c
86
*fs = '\0';
games/sail/extern.h
237
char fs;
games/sail/game.c
50
maxmove(struct ship *ship, int dir, int fs)
games/sail/game.c
63
if ((ship->file->FS || fs) && fs != -1) {
games/sail/game.c
65
Move = ship->specs->fs;
lib/libc/arch/amd64/SYS.h
64
movl %eax,%fs:(TCB_OFFSET_ERRNO); \
lib/libcrypto/err/err.c
1016
const char *ls, *fs, *rs;
lib/libcrypto/err/err.c
1024
fs = ERR_func_error_string(e);
lib/libcrypto/err/err.c
1031
if (fs == NULL) {
lib/libcrypto/err/err.c
1033
fs = fsbuf;
lib/libcrypto/err/err.c
1040
ret = snprintf(buf, len, "error:%08lX:%s:%s:%s", e, ls, fs, rs);
lib/libcurses/base/lib_mouse.c
293
if ((mouev.fs ^ oldstate) & MOUSE_BN1_DOWN)
lib/libcurses/base/lib_mouse.c
294
write_event(sp, mouev.fs & MOUSE_BN1_DOWN,
lib/libcurses/base/lib_mouse.c
296
if ((mouev.fs ^ oldstate) & MOUSE_BN2_DOWN)
lib/libcurses/base/lib_mouse.c
297
write_event(sp, mouev.fs & MOUSE_BN2_DOWN,
lib/libcurses/base/lib_mouse.c
299
if ((mouev.fs ^ oldstate) & MOUSE_BN3_DOWN)
lib/libcurses/base/lib_mouse.c
300
write_event(sp, mouev.fs & MOUSE_BN3_DOWN,
lib/libcurses/base/lib_mouse.c
304
oldstate = mouev.fs;
lib/libcurses/tinfo/lib_tparm.c
617
TPARM_DATA *fs;
lib/libcurses/tinfo/lib_tparm.c
623
fs = *(TPARM_DATA **) ft;
lib/libcurses/tinfo/lib_tparm.c
624
*result = *fs;
lib/libcurses/tinfo/lib_tparm.c
659
if ((fs = typeCalloc(TPARM_DATA, 1)) != 0) {
lib/libcurses/tinfo/lib_tparm.c
660
*fs = *result;
lib/libcurses/tinfo/lib_tparm.c
661
if ((fs->format = strdup(string)) != 0) {
lib/libcurses/tinfo/lib_tparm.c
662
if (tsearch(fs, &MyCache, cmp_format) != 0) {
lib/libcurses/tinfo/lib_tparm.c
665
free(fs);
lib/libcurses/tinfo/lib_tparm.c
669
free(fs);
libexec/rpc.rquotad/rquotad.c
183
struct fstab *fs;
libexec/rpc.rquotad/rquotad.c
187
while ((fs = getfsent())) {
libexec/rpc.rquotad/rquotad.c
188
if (strcmp(fs->fs_vfstype, "ffs"))
libexec/rpc.rquotad/rquotad.c
190
if (!hasquota(fs, &qfpathname))
libexec/rpc.rquotad/rquotad.c
200
fs_current->fs_file = strdup(fs->fs_file);
libexec/rpc.rquotad/rquotad.c
229
struct fs_stat *fs;
libexec/rpc.rquotad/rquotad.c
237
for (fs = fs_begin; fs != NULL; fs = fs->fs_next) {
libexec/rpc.rquotad/rquotad.c
239
if (fs->st_dev != st_path.st_dev)
libexec/rpc.rquotad/rquotad.c
243
if (quotactl(fs->fs_file, qcmd, id, (char *)dqblk) == 0)
libexec/rpc.rquotad/rquotad.c
246
if ((fd = open(fs->qfpathname, O_RDONLY)) == -1) {
libexec/rpc.rquotad/rquotad.c
247
syslog(LOG_ERR, "open error: %s: %m", fs->qfpathname);
libexec/rpc.rquotad/rquotad.c
268
syslog(LOG_ERR, "read error: %s: %m", fs->qfpathname);
libexec/rpc.rquotad/rquotad.c
282
hasquota(struct fstab *fs, char **qfnamep)
libexec/rpc.rquotad/rquotad.c
295
strlcpy(buf, fs->fs_mntops, sizeof buf);
libexec/rpc.rquotad/rquotad.c
308
(void)snprintf(buf, sizeof buf, "%s/%s.%s", fs->fs_file,
libexec/rpc.rquotad/rquotad.c
35
int hasquota(struct fstab *fs, char **qfnamep);
sbin/badsect/badsect.c
124
fs = &sblock;
sbin/badsect/badsect.c
125
rdfs(SBOFF, SBSIZE, (char *)fs);
sbin/badsect/badsect.c
131
dbtofsb(fs, number)) < 0) {
sbin/badsect/badsect.c
146
fsbn = dbtofsb(fs, blkno);
sbin/badsect/badsect.c
147
if (fsbn+cnt > fs->fs_ffs1_size) {
sbin/badsect/badsect.c
152
cg = dtog(fs, fsbn);
sbin/badsect/badsect.c
153
if (fsbn < cgdmin(fs, cg)) {
sbin/badsect/badsect.c
154
if (cg == 0 || (fsbn+cnt) > cgsblock(fs, cg)) {
sbin/badsect/badsect.c
160
if ((fsbn+cnt) > cgbase(fs, cg+1)) {
sbin/badsect/badsect.c
166
rdfs(fsbtodb(fs, cgtod(fs, cg)), (int)sblock.fs_cgsize,
sbin/badsect/badsect.c
173
bn = dtogd(fs, fsbn);
sbin/badsect/badsect.c
62
struct fs fs;
sbin/badsect/badsect.c
65
#define sblock ufs.fs
sbin/badsect/badsect.c
71
static struct fs *fs;
sbin/bioctl/bioctl.c
1046
char *s, *e, fs[32];
sbin/bioctl/bioctl.c
1069
strlcpy(fs, s, sz + 1);
sbin/bioctl/bioctl.c
1070
errx(1, "invalid flag %s", fs);
sbin/clri/clri.c
116
err(1, "%s: can't update superblock", fs);
sbin/clri/clri.c
133
err(1, "%s", fs);
sbin/clri/clri.c
155
err(1, "%s", fs);
sbin/clri/clri.c
66
struct fs *sbp;
sbin/clri/clri.c
68
char *fs, sblock[SBLOCKSIZE];
sbin/clri/clri.c
77
fs = *++argv;
sbin/clri/clri.c
81
if ((fd = opendev(fs, O_RDWR, 0, NULL)) == -1)
sbin/clri/clri.c
82
err(1, "%s", fs);
sbin/clri/clri.c
90
err(1, "%s: can't read superblock", fs);
sbin/clri/clri.c
91
sbp = (struct fs *)sblock;
sbin/clri/clri.c
96
sbp->fs_bsize >= (int)sizeof(struct fs))
sbin/dump/dump.h
81
extern struct fs *sblock; /* the file system super block */
sbin/dump/main.c
444
sblock = (struct fs *)sblock_buf;
sbin/dump/main.c
452
sblock->fs_bsize >= sizeof(struct fs))
sbin/dump/main.c
88
struct fs *sblock; /* the file system super block */
sbin/dump/optr.c
272
allocfsent(struct fstab *fs)
sbin/dump/optr.c
276
new = malloc(sizeof(*fs));
sbin/dump/optr.c
278
(new->fs_file = strdup(fs->fs_file)) == NULL ||
sbin/dump/optr.c
279
(new->fs_type = strdup(fs->fs_type)) == NULL ||
sbin/dump/optr.c
280
(new->fs_spec = strdup(fs->fs_spec)) == NULL)
sbin/dump/optr.c
282
new->fs_passno = fs->fs_passno;
sbin/dump/optr.c
283
new->fs_freq = fs->fs_freq;
sbin/dump/optr.c
297
struct fstab *fs;
sbin/dump/optr.c
305
while ((fs = getfsent()) != NULL) {
sbin/dump/optr.c
306
if (strcmp(fs->fs_vfstype, "ffs") &&
sbin/dump/optr.c
307
strcmp(fs->fs_vfstype, "ufs"))
sbin/dump/optr.c
309
if (strcmp(fs->fs_type, FSTAB_RW) &&
sbin/dump/optr.c
310
strcmp(fs->fs_type, FSTAB_RO) &&
sbin/dump/optr.c
311
strcmp(fs->fs_type, FSTAB_RQ))
sbin/dump/optr.c
313
fs = allocfsent(fs);
sbin/dump/optr.c
316
pf->pf_fstab = fs;
sbin/dump/optr.c
338
struct fstab *fs;
sbin/dump/optr.c
342
fs = pf->pf_fstab;
sbin/dump/optr.c
343
if (strcmp(fs->fs_file, key) == 0 ||
sbin/dump/optr.c
344
strcmp(fs->fs_spec, key) == 0)
sbin/dump/optr.c
345
return (fs);
sbin/dump/optr.c
346
rn = rawname(fs->fs_spec);
sbin/dump/optr.c
348
return (fs);
sbin/dump/optr.c
349
uid = getduid(rn != NULL ? rn : fs->fs_spec);
sbin/dump/optr.c
352
return (fs);
sbin/dump/optr.c
356
if (*fs->fs_spec == '/' &&
sbin/dump/optr.c
357
strcmp(fs->fs_spec + 1, key) == 0)
sbin/dump/optr.c
358
return (fs);
sbin/dump/optr.c
359
if (*fs->fs_file == '/' &&
sbin/dump/optr.c
360
strcmp(fs->fs_file + 1, key) == 0)
sbin/dump/optr.c
361
return (fs);
sbin/dump/optr.c
71
struct fstab *allocfsent(struct fstab *fs);
sbin/dumpfs/dumpfs.c
106
if ((fs = getfsfile(*argv)) != NULL)
sbin/dumpfs/dumpfs.c
107
name = fs->fs_spec;
sbin/dumpfs/dumpfs.c
144
afs.fs_bsize >= sizeof(struct fs))
sbin/dumpfs/dumpfs.c
60
struct fs fs;
sbin/dumpfs/dumpfs.c
63
#define afs fsun.fs
sbin/dumpfs/dumpfs.c
81
struct fstab *fs;
sbin/fsck/fsck.c
201
} else if ((fs = getfsfile(*argv)) == NULL &&
sbin/fsck/fsck.c
202
(fs = getfsspec(*argv)) == NULL) {
sbin/fsck/fsck.c
210
spec = fs->fs_spec;
sbin/fsck/fsck.c
211
type = fs->fs_vfstype;
sbin/fsck/fsck.c
212
if (BADTYPE(fs->fs_type))
sbin/fsck/fsck.c
225
isok(struct fstab *fs)
sbin/fsck/fsck.c
227
if (fs->fs_passno == 0)
sbin/fsck/fsck.c
230
if (BADTYPE(fs->fs_type))
sbin/fsck/fsck.c
235
if (!hasopt(fs->fs_mntops, "net"))
sbin/fsck/fsck.c
239
if (hasopt(fs->fs_mntops, "net"))
sbin/fsck/fsck.c
243
if (!selected(fs->fs_vfstype))
sbin/fsck/fsck.c
246
return fs;
sbin/fsck/fsck.c
93
struct fstab *fs;
sbin/fsck/preen.c
101
name = blockcheck(fs->fs_spec);
sbin/fsck/preen.c
104
maxp = (fs->fs_passno > maxp) ? fs->fs_passno : maxp;
sbin/fsck/preen.c
107
(passno == 1 && fs->fs_passno == 1)) {
sbin/fsck/preen.c
114
sumstatus = (*checkit)(fs->fs_vfstype,
sbin/fsck/preen.c
115
name, fs->fs_file, auxarg, NULL);
sbin/fsck/preen.c
122
"BAD DISK NAME %s\n", fs->fs_spec);
sbin/fsck/preen.c
126
if (passno == fs->fs_passno)
sbin/fsck/preen.c
127
addpart(fs->fs_vfstype, name,
sbin/fsck/preen.c
128
fs->fs_file, auxarg);
sbin/fsck/preen.c
78
struct fstab *fs;
sbin/fsck/preen.c
97
while ((fs = getfsent()) != 0) {
sbin/fsck/preen.c
98
if ((auxarg = (*docheck)(fs)) == NULL)
sbin/fsck_ext2fs/inode.c
59
#define fsck_ino_to_fsba(fs, x) \
sbin/fsck_ext2fs/inode.c
60
(letoh32((fs)->e2fs_gd[ino_to_cg(fs, x)].ext2bgd_i_tables) + \
sbin/fsck_ext2fs/inode.c
61
(((x)-1) % (fs)->e2fs.e2fs_ipg)/(fs)->e2fs_ipb)
sbin/fsck_ext2fs/pass5.c
104
j = fs->e2fs.e2fs_ipg * c + 1;
sbin/fsck_ext2fs/pass5.c
106
for (i = 0; i < fs->e2fs.e2fs_ipg; j++, i++) {
sbin/fsck_ext2fs/pass5.c
112
if (j > fs->e2fs.e2fs_icount) {
sbin/fsck_ext2fs/pass5.c
140
for (i = fs->e2fs.e2fs_ipg / NBBY; i < fs->e2fs_bsize; i++)
sbin/fsck_ext2fs/pass5.c
163
if (debug && (letoh16(fs->e2fs_gd[c].ext2bgd_nbfree) != nbfree ||
sbin/fsck_ext2fs/pass5.c
164
letoh16(fs->e2fs_gd[c].ext2bgd_nifree) != nifree ||
sbin/fsck_ext2fs/pass5.c
165
letoh16(fs->e2fs_gd[c].ext2bgd_ndirs) != ndirs)) {
sbin/fsck_ext2fs/pass5.c
168
letoh16(fs->e2fs_gd[c].ext2bgd_nbfree),
sbin/fsck_ext2fs/pass5.c
169
letoh16(fs->e2fs_gd[c].ext2bgd_nifree),
sbin/fsck_ext2fs/pass5.c
170
letoh16(fs->e2fs_gd[c].ext2bgd_ndirs),
sbin/fsck_ext2fs/pass5.c
177
if ((letoh16(fs->e2fs_gd[c].ext2bgd_nbfree) != nbfree ||
sbin/fsck_ext2fs/pass5.c
178
letoh16(fs->e2fs_gd[c].ext2bgd_nifree) != nifree ||
sbin/fsck_ext2fs/pass5.c
179
letoh16(fs->e2fs_gd[c].ext2bgd_ndirs) != ndirs) &&
sbin/fsck_ext2fs/pass5.c
181
fs->e2fs_gd[c].ext2bgd_nbfree = htole16(nbfree);
sbin/fsck_ext2fs/pass5.c
182
fs->e2fs_gd[c].ext2bgd_nifree = htole16(nifree);
sbin/fsck_ext2fs/pass5.c
183
fs->e2fs_gd[c].ext2bgd_ndirs = htole16(ndirs);
sbin/fsck_ext2fs/pass5.c
187
if (debug && memcmp(blk_bitmap->b_un.b_buf, bbmap, fs->e2fs_bsize)) {
sbin/fsck_ext2fs/pass5.c
189
print_bmap(blk_bitmap->b_un.b_buf, fs->e2fs_bsize);
sbin/fsck_ext2fs/pass5.c
191
print_bmap(bbmap, fs->e2fs_bsize);
sbin/fsck_ext2fs/pass5.c
196
if (memcmp(blk_bitmap->b_un.b_buf, bbmap, fs->e2fs_bsize) &&
sbin/fsck_ext2fs/pass5.c
198
memcpy(blk_bitmap->b_un.b_buf, bbmap, fs->e2fs_bsize);
sbin/fsck_ext2fs/pass5.c
201
if (debug && memcmp(ino_bitmap->b_un.b_buf, ibmap, fs->e2fs_bsize)) {
sbin/fsck_ext2fs/pass5.c
203
print_bmap(ino_bitmap->b_un.b_buf, fs->e2fs_bsize);
sbin/fsck_ext2fs/pass5.c
205
print_bmap(ibmap, fs->e2fs_bsize);
sbin/fsck_ext2fs/pass5.c
209
if (memcmp(ino_bitmap->b_un.b_buf, ibmap, fs->e2fs_bsize) &&
sbin/fsck_ext2fs/pass5.c
211
memcpy(ino_bitmap->b_un.b_buf, ibmap, fs->e2fs_bsize);
sbin/fsck_ext2fs/pass5.c
216
if (debug && (fs->e2fs.e2fs_fbcount != cs_nbfree ||
sbin/fsck_ext2fs/pass5.c
217
fs->e2fs.e2fs_ficount != cs_nifree)) {
sbin/fsck_ext2fs/pass5.c
219
fs->e2fs.e2fs_fbcount, fs->e2fs.e2fs_ficount,
sbin/fsck_ext2fs/pass5.c
222
if ((fs->e2fs.e2fs_fbcount != cs_nbfree ||
sbin/fsck_ext2fs/pass5.c
223
fs->e2fs.e2fs_ficount != cs_nifree)
sbin/fsck_ext2fs/pass5.c
225
fs->e2fs.e2fs_fbcount = cs_nbfree;
sbin/fsck_ext2fs/pass5.c
226
fs->e2fs.e2fs_ficount = cs_nifree;
sbin/fsck_ext2fs/pass5.c
54
struct m_ext2fs *fs = &sblock;
sbin/fsck_ext2fs/pass5.c
68
ibmap = malloc(fs->e2fs_bsize);
sbin/fsck_ext2fs/pass5.c
69
bbmap = malloc(fs->e2fs_bsize);
sbin/fsck_ext2fs/pass5.c
74
for (c = 0; c < fs->e2fs_ncg; c++) {
sbin/fsck_ext2fs/pass5.c
80
nifree = fs->e2fs.e2fs_ipg;
sbin/fsck_ext2fs/pass5.c
84
blk_bitmap = getdatablk(letoh32(fs->e2fs_gd[c].ext2bgd_b_bitmap),
sbin/fsck_ext2fs/pass5.c
85
fs->e2fs_bsize);
sbin/fsck_ext2fs/pass5.c
87
getblk(blk_bitmap, letoh32(fs->e2fs_gd[c].ext2bgd_b_bitmap),
sbin/fsck_ext2fs/pass5.c
88
fs->e2fs_bsize);
sbin/fsck_ext2fs/pass5.c
91
ino_bitmap = getdatablk(letoh32(fs->e2fs_gd[c].ext2bgd_i_bitmap),
sbin/fsck_ext2fs/pass5.c
92
fs->e2fs_bsize);
sbin/fsck_ext2fs/pass5.c
94
getblk(ino_bitmap, letoh32(fs->e2fs_gd[c].ext2bgd_i_bitmap),
sbin/fsck_ext2fs/pass5.c
95
fs->e2fs_bsize);
sbin/fsck_ext2fs/pass5.c
97
memset(bbmap, 0, fs->e2fs_bsize);
sbin/fsck_ext2fs/pass5.c
98
memset(ibmap, 0, fs->e2fs_bsize);
sbin/fsck_ext2fs/setup.c
452
calcsb(char *dev, int devfd, struct m_ext2fs *fs, struct disklabel *lp)
sbin/fsck_ext2fs/setup.c
476
memset(fs, 0, sizeof(struct m_ext2fs));
sbin/fsck_ext2fs/setup.c
477
fs->e2fs_bsize = DISKLABELV1_FFS_FSIZE(pp->p_fragblock); /* XXX */
sbin/fsck_ext2fs/setup.c
478
if (fs->e2fs_bsize == 0) {
sbin/fsck_ext2fs/setup.c
482
fs->e2fs.e2fs_log_bsize = fs->e2fs_bsize / 1024;
sbin/fsck_ext2fs/setup.c
483
fs->e2fs.e2fs_bcount = (pp->p_size * DEV_BSIZE) / fs->e2fs_bsize;
sbin/fsck_ext2fs/setup.c
484
fs->e2fs.e2fs_first_dblock = (fs->e2fs.e2fs_log_bsize == 0) ? 1 : 0;
sbin/fsck_ext2fs/setup.c
485
fs->e2fs.e2fs_bpg = fs->e2fs_bsize * NBBY;
sbin/fsck_ext2fs/setup.c
486
fs->e2fs_bshift = LOG_MINBSIZE + fs->e2fs.e2fs_log_bsize;
sbin/fsck_ext2fs/setup.c
487
fs->e2fs_qbmask = fs->e2fs_bsize - 1;
sbin/fsck_ext2fs/setup.c
488
fs->e2fs_bmask = ~fs->e2fs_qbmask;
sbin/fsck_ext2fs/setup.c
489
fs->e2fs_ncg =
sbin/fsck_ext2fs/setup.c
490
howmany(fs->e2fs.e2fs_bcount - fs->e2fs.e2fs_first_dblock,
sbin/fsck_ext2fs/setup.c
491
fs->e2fs.e2fs_bpg);
sbin/fsck_ext2fs/setup.c
492
fs->e2fs_fsbtodb = fs->e2fs.e2fs_log_bsize + 1;
sbin/fsck_ext2fs/setup.c
493
fs->e2fs_ngdb = howmany(fs->e2fs_ncg,
sbin/fsck_ext2fs/setup.c
494
fs->e2fs_bsize / sizeof(struct ext2_gd));
sbin/fsck_ffs/fsck.h
114
struct fs *b_fs; /* super block */
sbin/fsck_ffs/pass5.c
102
i = fs->fs_contigsumsize;
sbin/fsck_ffs/pass5.c
103
fs->fs_contigsumsize =
sbin/fsck_ffs/pass5.c
104
MINIMUM(fs->fs_maxcontig, FS_MAXCONTIG);
sbin/fsck_ffs/pass5.c
105
if (CGSIZE(fs) > fs->fs_bsize) {
sbin/fsck_ffs/pass5.c
107
fs->fs_contigsumsize = i;
sbin/fsck_ffs/pass5.c
113
fs->fs_cgsize =
sbin/fsck_ffs/pass5.c
114
fragroundup(fs, CGSIZE(fs));
sbin/fsck_ffs/pass5.c
121
switch ((int)fs->fs_postblformat) {
sbin/fsck_ffs/pass5.c
127
mapsize = &ocg->cg_free[howmany(fs->fs_fpg, NBBY)] -
sbin/fsck_ffs/pass5.c
129
blkmapsize = howmany(fs->fs_fpg, NBBY);
sbin/fsck_ffs/pass5.c
132
savednrpos = fs->fs_nrpos;
sbin/fsck_ffs/pass5.c
133
fs->fs_nrpos = 8;
sbin/fsck_ffs/pass5.c
142
fs->fs_cpg * sizeof(int32_t);
sbin/fsck_ffs/pass5.c
143
newcg->cg_iusedoff = newcg->cg_boff + fs->fs_cpg *
sbin/fsck_ffs/pass5.c
144
fs->fs_nrpos * sizeof(int16_t);
sbin/fsck_ffs/pass5.c
146
inomapsize = howmany(fs->fs_ipg, CHAR_BIT);
sbin/fsck_ffs/pass5.c
148
blkmapsize = howmany(fs->fs_fpg, CHAR_BIT);
sbin/fsck_ffs/pass5.c
150
if (fs->fs_contigsumsize > 0) {
sbin/fsck_ffs/pass5.c
156
(fs->fs_contigsumsize + 1) * sizeof(int32_t);
sbin/fsck_ffs/pass5.c
158
howmany(fragstoblks(fs, fs->fs_fpg), CHAR_BIT);
sbin/fsck_ffs/pass5.c
169
fs->fs_postblformat);
sbin/fsck_ffs/pass5.c
175
dmax = blknum(fs, fs->fs_size + fs->fs_frag - 1);
sbin/fsck_ffs/pass5.c
176
for (d = fs->fs_size; d < dmax; d++)
sbin/fsck_ffs/pass5.c
179
info_maxcg = fs->fs_ncg;
sbin/fsck_ffs/pass5.c
181
for (c = 0; c < fs->fs_ncg; c++) {
sbin/fsck_ffs/pass5.c
187
dbase = cgbase(fs, c);
sbin/fsck_ffs/pass5.c
188
dmax = dbase + fs->fs_fpg;
sbin/fsck_ffs/pass5.c
189
if (dmax > fs->fs_size)
sbin/fsck_ffs/pass5.c
190
dmax = fs->fs_size;
sbin/fsck_ffs/pass5.c
194
if (c == fs->fs_ncg - 1)
sbin/fsck_ffs/pass5.c
195
newcg->cg_ncyl = fs->fs_ncyl % fs->fs_cpg;
sbin/fsck_ffs/pass5.c
197
newcg->cg_ncyl = fs->fs_cpg;
sbin/fsck_ffs/pass5.c
199
if (fs->fs_contigsumsize > 0)
sbin/fsck_ffs/pass5.c
200
newcg->cg_nclusterblks = newcg->cg_ndblk / fs->fs_frag;
sbin/fsck_ffs/pass5.c
204
newcg->cg_cs.cs_nifree = fs->fs_ipg;
sbin/fsck_ffs/pass5.c
214
if (fs->fs_magic == FS_UFS1_MAGIC) {
sbin/fsck_ffs/pass5.c
218
cg->cg_irotor < fs->fs_ipg)
sbin/fsck_ffs/pass5.c
222
if (cg->cg_initediblk > fs->fs_ipg)
sbin/fsck_ffs/pass5.c
223
newcg->cg_initediblk = fs->fs_ipg;
sbin/fsck_ffs/pass5.c
226
newcg->cg_ffs2_niblk = fs->fs_ipg;
sbin/fsck_ffs/pass5.c
233
if (fs->fs_postblformat == FS_42POSTBLFMT)
sbin/fsck_ffs/pass5.c
235
j = fs->fs_ipg * c;
sbin/fsck_ffs/pass5.c
268
d += fs->fs_frag, i += fs->fs_frag) {
sbin/fsck_ffs/pass5.c
270
for (j = 0; j < fs->fs_frag; j++) {
sbin/fsck_ffs/pass5.c
276
if (frags == fs->fs_frag) {
sbin/fsck_ffs/pass5.c
278
if (fs->fs_contigsumsize > 0)
sbin/fsck_ffs/pass5.c
280
i / fs->fs_frag);
sbin/fsck_ffs/pass5.c
283
blk = blkmap(fs, cg_blksfree(newcg), i);
sbin/fsck_ffs/pass5.c
284
ffs_fragacct(fs, blk, newcg->cg_frsum, 1);
sbin/fsck_ffs/pass5.c
287
if (fs->fs_contigsumsize > 0) {
sbin/fsck_ffs/pass5.c
298
if (run > fs->fs_contigsumsize)
sbin/fsck_ffs/pass5.c
299
run = fs->fs_contigsumsize;
sbin/fsck_ffs/pass5.c
311
if (run > fs->fs_contigsumsize)
sbin/fsck_ffs/pass5.c
312
run = fs->fs_contigsumsize;
sbin/fsck_ffs/pass5.c
320
cs = &fs->fs_cs(fs, c);
sbin/fsck_ffs/pass5.c
327
memcpy(cg, newcg, (size_t)fs->fs_cgsize);
sbin/fsck_ffs/pass5.c
345
if (fs->fs_postblformat == FS_42POSTBLFMT)
sbin/fsck_ffs/pass5.c
346
fs->fs_nrpos = savednrpos;
sbin/fsck_ffs/pass5.c
349
if (memcmp(&cstotal, &fs->fs_cstotal, sumsize) != 0
sbin/fsck_ffs/pass5.c
351
memcpy(&fs->fs_cstotal, &cstotal, sumsize);
sbin/fsck_ffs/pass5.c
352
fs->fs_ronly = 0;
sbin/fsck_ffs/pass5.c
353
fs->fs_fmod = 0;
sbin/fsck_ffs/pass5.c
67
struct fs *fs = &sblock;
sbin/fsck_ffs/pass5.c
81
memset(newcg, 0, (size_t)fs->fs_cgsize);
sbin/fsck_ffs/pass5.c
83
if (fs->fs_maxcontig < 2 && fs->fs_contigsumsize > 0) {
sbin/fsck_ffs/pass5.c
87
fs->fs_contigsumsize = 0;
sbin/fsck_ffs/pass5.c
92
if (fs->fs_maxcontig > 1) {
sbin/fsck_ffs/pass5.c
95
if (fs->fs_contigsumsize < 1) {
sbin/fsck_ffs/pass5.c
97
} else if (fs->fs_contigsumsize < fs->fs_maxcontig &&
sbin/fsck_ffs/pass5.c
98
fs->fs_contigsumsize < FS_MAXCONTIG) {
sbin/fsck_ffs/setup.c
609
calcsb(char *dev, int devfd, struct fs *fs, struct disklabel *lp,
sbin/fsck_ffs/setup.c
637
memset(fs, 0, sizeof(struct fs));
sbin/fsck_ffs/setup.c
638
fs->fs_fsize = DISKLABELV1_FFS_FSIZE(pp->p_fragblock);
sbin/fsck_ffs/setup.c
639
fs->fs_frag = DISKLABELV1_FFS_FRAG(pp->p_fragblock);
sbin/fsck_ffs/setup.c
64
int calcsb(char *, int, struct fs *, struct disklabel *, uint32_t);
sbin/fsck_ffs/setup.c
640
fs->fs_fpg = pp->p_cpg * fs->fs_frag;
sbin/fsck_ffs/setup.c
641
fs->fs_bsize = fs->fs_fsize * fs->fs_frag;
sbin/fsck_ffs/setup.c
642
fs->fs_nspf = DL_SECTOBLK(lp, fs->fs_fsize / lp->d_secsize);
sbin/fsck_ffs/setup.c
643
for (fs->fs_fsbtodb = 0, i = NSPF(fs); i > 1; i >>= 1)
sbin/fsck_ffs/setup.c
644
fs->fs_fsbtodb++;
sbin/fsck_ffs/setup.c
649
fs->fs_size = DL_SECTOBLK(lp, DL_GETPSIZE(pp)) / fs->fs_nspf;
sbin/fsck_ffs/setup.c
650
fs->fs_ncg = howmany(fs->fs_size, fs->fs_fpg);
sbin/fsck_ffs/setup.c
651
fs->fs_sblkno = roundup(
sbin/fsck_ffs/setup.c
652
howmany(sblockloc + SBSIZE, fs->fs_fsize),
sbin/fsck_ffs/setup.c
653
fs->fs_frag);
sbin/fsck_ffs/setup.c
67
static int cmpsb(struct fs *, struct fs *);
sbin/fsck_ffs/setup.c
676
cmpsb(struct fs *sb, struct fs *asb)
sbin/fsck_ffs/setup.c
87
struct fs proto;
sbin/fsck_msdos/fat.c
104
if (read(fs, buffer, boot->FATsecs * boot->BytesPerSec)
sbin/fsck_msdos/fat.c
430
writefat(int fs, struct bootblock *boot, struct fatEntry *fat)
sbin/fsck_msdos/fat.c
498
if (lseek(fs, off, SEEK_SET) != off
sbin/fsck_msdos/fat.c
499
|| write(fs, buffer, fatsz) != fatsz) {
sbin/fsck_msdos/fat.c
76
readfat(int fs, struct bootblock *boot, int no, struct fatEntry **fp)
sbin/fsck_msdos/fat.c
97
if (lseek(fs, off, SEEK_SET) != off) {
sbin/fsirand/fsirand.c
100
struct fs *sblock, *tmpsblock;
sbin/fsirand/fsirand.c
130
sblock = (struct fs *)&sbuf;
sbin/fsirand/fsirand.c
190
tmpsblock = (struct fs *)&sbuftmp;
sbin/growfs/growfs.c
136
static int isblock(struct fs *, unsigned char *, int);
sbin/growfs/growfs.c
137
static void clrblock(struct fs *, unsigned char *, int);
sbin/growfs/growfs.c
138
static void setblock(struct fs *, unsigned char *, int);
sbin/growfs/growfs.c
152
static void ffs1_sb_update(struct fs *, daddr_t);
sbin/growfs/growfs.c
1532
isblock(struct fs *fs, unsigned char *cp, int h)
sbin/growfs/growfs.c
1536
switch (fs->fs_frag) {
sbin/growfs/growfs.c
1549
fprintf(stderr, "isblock bad fs_frag %d\n", fs->fs_frag);
sbin/growfs/growfs.c
1560
clrblock(struct fs *fs, unsigned char *cp, int h)
sbin/growfs/growfs.c
1562
switch ((fs)->fs_frag) {
sbin/growfs/growfs.c
1576
warnx("clrblock bad fs_frag %d", fs->fs_frag);
sbin/growfs/growfs.c
1587
setblock(struct fs *fs, unsigned char *cp, int h)
sbin/growfs/growfs.c
1589
switch (fs->fs_frag) {
sbin/growfs/growfs.c
1603
warnx("setblock bad fs_frag %d", fs->fs_frag);
sbin/growfs/growfs.c
1803
osblock.fs_bsize >= (int32_t) sizeof(struct fs))
sbin/growfs/growfs.c
2155
ffs1_sb_update(struct fs *fs, daddr_t sbloc)
sbin/growfs/growfs.c
2157
fs->fs_flags = fs->fs_ffs1_flags;
sbin/growfs/growfs.c
2158
fs->fs_sblockloc = sbloc;
sbin/growfs/growfs.c
2159
fs->fs_maxbsize = fs->fs_bsize;
sbin/growfs/growfs.c
2160
fs->fs_time = fs->fs_ffs1_time;
sbin/growfs/growfs.c
2161
fs->fs_size = fs->fs_ffs1_size;
sbin/growfs/growfs.c
2162
fs->fs_dsize = fs->fs_ffs1_dsize;
sbin/growfs/growfs.c
2163
fs->fs_csaddr = fs->fs_ffs1_csaddr;
sbin/growfs/growfs.c
2164
fs->fs_cstotal.cs_ndir = fs->fs_ffs1_cstotal.cs_ndir;
sbin/growfs/growfs.c
2165
fs->fs_cstotal.cs_nbfree = fs->fs_ffs1_cstotal.cs_nbfree;
sbin/growfs/growfs.c
2166
fs->fs_cstotal.cs_nifree = fs->fs_ffs1_cstotal.cs_nifree;
sbin/growfs/growfs.c
2167
fs->fs_cstotal.cs_nffree = fs->fs_ffs1_cstotal.cs_nffree;
sbin/growfs/growfs.c
2168
fs->fs_ffs1_flags |= FS_FLAGS_UPDATED;
sbin/growfs/growfs.c
76
struct fs fs;
sbin/growfs/growfs.c
79
#define sblock fsun1.fs /* the new superblock */
sbin/growfs/growfs.c
80
#define osblock fsun2.fs /* the old superblock */
sbin/mount/mount.c
105
struct fstab *fs;
sbin/mount/mount.c
195
while ((fs = getfsent()) != NULL) {
sbin/mount/mount.c
196
if (BADTYPE(fs->fs_type))
sbin/mount/mount.c
200
if (!hasopt(fs->fs_mntops, "net"))
sbin/mount/mount.c
204
if (hasopt(fs->fs_mntops, "net"))
sbin/mount/mount.c
208
if (!selected(fs->fs_vfstype))
sbin/mount/mount.c
210
if (hasopt(fs->fs_mntops, "noauto"))
sbin/mount/mount.c
212
if (disklabelcheck(fs))
sbin/mount/mount.c
214
if (mountfs(fs->fs_vfstype, fs->fs_spec,
sbin/mount/mount.c
215
fs->fs_file, options,
sbin/mount/mount.c
216
fs->fs_mntops, !forceall))
sbin/mount/mount.c
246
fs = getfsfile(mntbuf->f_mntonname);
sbin/mount/mount.c
247
if (fs == NULL)
sbin/mount/mount.c
252
if ((fs = malloc(sizeof(*fs))) == NULL)
sbin/mount/mount.c
254
fs->fs_vfstype = mntbuf->f_fstypename;
sbin/mount/mount.c
255
fs->fs_spec = mntbuf->f_mntfromspec;
sbin/mount/mount.c
262
fs->fs_mntops = flags2opts(mntbuf->f_flags);
sbin/mount/mount.c
265
if ((fs = getfsfile(mntpath)) == NULL &&
sbin/mount/mount.c
266
(fs = getfsspec(mntpath)) == NULL)
sbin/mount/mount.c
269
if (BADTYPE(fs->fs_type))
sbin/mount/mount.c
272
mntonname = fs->fs_file;
sbin/mount/mount.c
274
rval = mountfs(fs->fs_vfstype, fs->fs_spec,
sbin/mount/mount.c
275
mntonname, options, fs->fs_mntops, skip);
sbin/mount/mount.c
745
disklabelcheck(struct fstab *fs)
sbin/mount/mount.c
749
if (strcmp(fs->fs_vfstype, "nfs") != 0 ||
sbin/mount/mount.c
750
strpbrk(fs->fs_spec, ":@") == NULL) {
sbin/mount/mount.c
751
labelfs = readlabelfs(fs->fs_spec, 0);
sbin/mount/mount.c
753
strcmp(labelfs, fs->fs_vfstype) == 0)
sbin/mount/mount.c
755
if (strcmp(fs->fs_vfstype, "ufs") == 0 &&
sbin/mount/mount.c
758
fs->fs_spec);
sbin/mount/mount.c
761
if (strcmp(fs->fs_vfstype, "mfs") == 0 &&
sbin/mount/mount.c
765
fs->fs_spec, fs->fs_vfstype, labelfs);
sbin/ncheck_ffs/ncheck_ffs.c
597
sblock = (struct fs *)sblock_buf;
sbin/ncheck_ffs/ncheck_ffs.c
604
sblock->fs_bsize >= sizeof(struct fs))
sbin/ncheck_ffs/ncheck_ffs.c
87
struct fs *sblock; /* the file system super block */
sbin/newfs/mkfs.c
1052
isblock(struct fs *fs, unsigned char *cp, int h)
sbin/newfs/mkfs.c
1056
switch (fs->fs_frag) {
sbin/newfs/mkfs.c
1070
printf("isblock bad fs_frag %d\n", fs->fs_frag);
sbin/newfs/mkfs.c
1072
warnx("isblock bad fs_frag %d", fs->fs_frag);
sbin/newfs/mkfs.c
108
struct fs fs;
sbin/newfs/mkfs.c
1082
clrblock(struct fs *fs, unsigned char *cp, int h)
sbin/newfs/mkfs.c
1084
switch ((fs)->fs_frag) {
sbin/newfs/mkfs.c
1099
printf("clrblock bad fs_frag %d\n", fs->fs_frag);
sbin/newfs/mkfs.c
1101
warnx("clrblock bad fs_frag %d", fs->fs_frag);
sbin/newfs/mkfs.c
111
#define sblock fsun->fs
sbin/newfs/mkfs.c
1111
setblock(struct fs *fs, unsigned char *cp, int h)
sbin/newfs/mkfs.c
1113
switch (fs->fs_frag) {
sbin/newfs/mkfs.c
1128
printf("setblock bad fs_frag %d\n", fs->fs_frag);
sbin/newfs/mkfs.c
1130
warnx("setblock bad fs_frag %d", fs->fs_frag);
sbin/newfs/mkfs.c
140
void setblock(struct fs *, unsigned char *, int);
sbin/newfs/mkfs.c
141
void clrblock(struct fs *, unsigned char *, int);
sbin/newfs/mkfs.c
142
int isblock(struct fs *, unsigned char *, int);
sbin/newfs/mkfs.c
449
sblock.fs_sbsize = fragroundup(&sblock, sizeof(struct fs));
sbin/newfs/mkfs.c
514
struct fs *fs1;
sbin/newfs/mkfs.c
519
fs1 = &fsun1->fs;
sbin/newfs/newfs.c
794
struct statfs fs;
sbin/newfs/newfs.c
797
if (statfs(tmp, &fs) != 0)
sbin/newfs/newfs.c
799
if (fs.f_flags & MNT_RDONLY) {
sbin/newfs/newfs.c
800
if (statfs(mnt, &fs) != 0)
sbin/newfs/newfs.c
802
if (strcmp(fs.f_mntonname, "/") != 0)
sbin/newfs_ext2fs/mke2fs.c
154
#define cgbase(fs, c) \
sbin/newfs_ext2fs/mke2fs.c
155
((fs)->e2fs.e2fs_first_dblock + (fs)->e2fs.e2fs_bpg * (c))
sbin/quotacheck/quotacheck.c
133
struct fstab *fs;
sbin/quotacheck/quotacheck.c
196
while ((fs = getfsent()) != NULL) {
sbin/quotacheck/quotacheck.c
197
if (((argnum = oneof_realpath(fs->fs_file, argv, argc)) >= 0 ||
sbin/quotacheck/quotacheck.c
198
(argnum = oneof_specname(fs->fs_spec, argv, argc)) >= 0) &&
sbin/quotacheck/quotacheck.c
199
(auxdata = needchk(fs)) &&
sbin/quotacheck/quotacheck.c
200
(name = blockcheck(fs->fs_spec))) {
sbin/quotacheck/quotacheck.c
202
errs += chkquota(fs->fs_vfstype, name,
sbin/quotacheck/quotacheck.c
203
fs->fs_file, auxdata, NULL);
sbin/quotacheck/quotacheck.c
224
needchk(struct fstab *fs)
sbin/quotacheck/quotacheck.c
229
if (fs->fs_passno == 0)
sbin/quotacheck/quotacheck.c
231
if (strcmp(fs->fs_type, FSTAB_RW))
sbin/quotacheck/quotacheck.c
233
if (strcmp(fs->fs_vfstype, "ffs") &&
sbin/quotacheck/quotacheck.c
234
strcmp(fs->fs_vfstype, "ufs") &&
sbin/quotacheck/quotacheck.c
235
strcmp(fs->fs_vfstype, "mfs"))
sbin/quotacheck/quotacheck.c
240
if (gflag && hasquota(fs, GRPQUOTA, &qfnp)) {
sbin/quotacheck/quotacheck.c
244
if (uflag && hasquota(fs, USRQUOTA, &qfnp)) {
sbin/quotacheck/quotacheck.c
288
sblock.fs_bsize >= sizeof(struct fs))
sbin/quotacheck/quotacheck.c
543
hasquota(struct fstab *fs, int type, char **qfnamep)
sbin/quotacheck/quotacheck.c
556
(void)strlcpy(buf, fs->fs_mntops, sizeof(buf));
sbin/quotacheck/quotacheck.c
571
"%s/%s.%s", fs->fs_file, qfname, qfextension[type]);
sbin/quotacheck/quotacheck.c
66
struct fs sblk;
sbin/scan_ffs/scan_ffs.c
51
print_info(int flags, struct fs *sb, long long at, char* lastmount)
sbin/scan_ffs/scan_ffs.c
77
struct fs *sb;
sbin/scan_ffs/scan_ffs.c
92
sb = (struct fs*)(&buf[n]);
sbin/tunefs/tunefs.c
269
getsb(struct fs *fs, const char *file)
sbin/tunefs/tunefs.c
276
bread(sblock_try[i] / DEV_BSIZE, (char *)fs, SBLOCKSIZE, file);
sbin/tunefs/tunefs.c
277
switch(fs->fs_magic) {
sbin/tunefs/tunefs.c
288
if ((is_ufs2 || fs->fs_flags & FS_FLAGS_UPDATED)
sbin/tunefs/tunefs.c
289
&& fs->fs_sblockloc != sblock_try[i])
sbin/tunefs/tunefs.c
317
struct fstab *fs;
sbin/tunefs/tunefs.c
320
fs = getfsfile(name);
sbin/tunefs/tunefs.c
321
if (fs) {
sbin/tunefs/tunefs.c
322
if ((p = strrchr(fs->fs_spec, '/')) != NULL) {
sbin/tunefs/tunefs.c
324
(int)(p - fs->fs_spec), fs->fs_spec, p + 1);
sbin/tunefs/tunefs.c
327
name = fs->fs_spec;
sbin/tunefs/tunefs.c
58
struct fs sb;
sbin/tunefs/tunefs.c
73
static void getsb(struct fs *, const char *);
sbin/umount/umount.c
122
struct statfs *fs;
sbin/umount/umount.c
126
n = getmntinfo(&fs, MNT_NOWAIT);
sbin/umount/umount.c
133
if (strncmp(fs[n].f_mntonname, "/", MNAMELEN) == 0)
sbin/umount/umount.c
135
if (!selected(fs[n].f_fstypename))
sbin/umount/umount.c
137
if (umountfs(fs[n].f_mntonname))
sys/arch/alpha/stand/installboot.c
323
struct fs *fs;
sys/arch/alpha/stand/installboot.c
379
sbread(devfd, partoffset, &fs, sblock);
sys/arch/alpha/stand/installboot.c
382
if ((buf = malloc(fs->fs_bsize)) == NULL)
sys/arch/alpha/stand/installboot.c
385
blk = fsbtodb(fs, ino_to_fsba(fs, statbuf.st_ino));
sys/arch/alpha/stand/installboot.c
386
devread(devfd, buf, blk + partoffset, fs->fs_bsize, "inode");
sys/arch/alpha/stand/installboot.c
387
if (fs->fs_magic == FS_UFS1_MAGIC) {
sys/arch/alpha/stand/installboot.c
388
ip1 = (struct ufs1_dinode *)(buf) + ino_to_fsbo(fs,
sys/arch/alpha/stand/installboot.c
390
ndb = howmany(ip1->di_size, fs->fs_bsize);
sys/arch/alpha/stand/installboot.c
392
ip2 = (struct ufs2_dinode *)(buf) + ino_to_fsbo(fs,
sys/arch/alpha/stand/installboot.c
394
ndb = howmany(ip2->di_size, fs->fs_bsize);
sys/arch/alpha/stand/installboot.c
405
bbinfop->bsize = fs->fs_bsize;
sys/arch/alpha/stand/installboot.c
414
if (fs->fs_magic == FS_UFS1_MAGIC) {
sys/arch/alpha/stand/installboot.c
417
blk = fsbtodb(fs, *ap1);
sys/arch/alpha/stand/installboot.c
425
blk = fsbtodb(fs, *ap2);
sys/arch/alpha/stand/installboot.c
443
if (fs->fs_magic == FS_UFS1_MAGIC) {
sys/arch/alpha/stand/installboot.c
445
devread(devfd, buf, blk + partoffset, fs->fs_bsize,
sys/arch/alpha/stand/installboot.c
448
for (; i < NINDIR(fs) && *ap1 && ndb; i++, ap1++, ndb--) {
sys/arch/alpha/stand/installboot.c
449
blk = fsbtodb(fs, *ap1);
sys/arch/alpha/stand/installboot.c
456
devread(devfd, buf, blk + partoffset, fs->fs_bsize,
sys/arch/alpha/stand/installboot.c
459
for (; i < NINDIR(fs) && *ap2 && ndb; i++, ap2++, ndb--) {
sys/arch/alpha/stand/installboot.c
460
blk = fsbtodb(fs, *ap2);
sys/arch/alpha/stand/installboot.c
483
sbchk(struct fs *fs, daddr_t sbloc)
sys/arch/alpha/stand/installboot.c
488
if (fs->fs_magic != FS_UFS2_MAGIC && fs->fs_magic != FS_UFS1_MAGIC) {
sys/arch/alpha/stand/installboot.c
491
fs->fs_magic);
sys/arch/alpha/stand/installboot.c
499
if (fs->fs_magic == FS_UFS1_MAGIC && sbloc == SBLOCK_UFS2) {
sys/arch/alpha/stand/installboot.c
506
if (fs->fs_bsize <= 0 || fs->fs_bsize < sizeof(struct fs) ||
sys/arch/alpha/stand/installboot.c
507
fs->fs_bsize > MAXBSIZE) {
sys/arch/alpha/stand/installboot.c
510
fs->fs_bsize);
sys/arch/alpha/stand/installboot.c
514
if (fs->fs_sbsize <= 0 || fs->fs_sbsize > SBSIZE) {
sys/arch/alpha/stand/installboot.c
517
fs->fs_sbsize);
sys/arch/alpha/stand/installboot.c
521
if (fs->fs_inopb <= 0) {
sys/arch/alpha/stand/installboot.c
524
fs->fs_inopb);
sys/arch/alpha/stand/installboot.c
530
fs->fs_magic == FS_UFS2_MAGIC ? "ffs2" : "ffs1");
sys/arch/alpha/stand/installboot.c
536
sbread(int fd, daddr_t poffset, struct fs **fs, char *sblock)
sys/arch/alpha/stand/installboot.c
544
*fs = (struct fs *)sblock;
sys/arch/alpha/stand/installboot.c
545
if (sbchk(*fs, sbtry[i]))
sys/arch/alpha/stand/installboot.c
73
static int sbchk(struct fs *, daddr_t);
sys/arch/alpha/stand/installboot.c
74
static void sbread(int, daddr_t, struct fs **, char *);
sys/arch/i386/include/asm.h
127
#define CPUVAR(var) %fs:__CONCAT(CPU_INFO_,var)
sys/arch/landisk/stand/xxboot/ufs12.c
111
static void ffs_oldfscompat(struct fs *);
sys/arch/landisk/stand/xxboot/ufs12.c
121
struct fs *fs = fp->f_fs;
sys/arch/landisk/stand/xxboot/ufs12.c
129
buf = alloc(fs->fs_bsize);
sys/arch/landisk/stand/xxboot/ufs12.c
132
fsbtodb(fs, ino_to_fsba(fs, inumber)), fs->fs_bsize, buf, &rsize);
sys/arch/landisk/stand/xxboot/ufs12.c
135
if (rsize != (size_t)fs->fs_bsize) {
sys/arch/landisk/stand/xxboot/ufs12.c
144
fp->f_di.i2 = dp[ino_to_fsbo(fs, inumber)];
sys/arch/landisk/stand/xxboot/ufs12.c
149
fp->f_di.i1 = dp[ino_to_fsbo(fs, inumber)];
sys/arch/landisk/stand/xxboot/ufs12.c
164
free(buf, fs->fs_bsize);
sys/arch/landisk/stand/xxboot/ufs12.c
176
struct fs *fs = fp->f_fs;
sys/arch/landisk/stand/xxboot/ufs12.c
184
buf = alloc(fs->fs_bsize);
sys/arch/landisk/stand/xxboot/ufs12.c
187
fsbtodb(fs, ino_to_fsba(fs, inumber)), fs->fs_bsize, buf, &rsize);
sys/arch/landisk/stand/xxboot/ufs12.c
190
if (rsize != (size_t)fs->fs_bsize) {
sys/arch/landisk/stand/xxboot/ufs12.c
198
dp = &((struct ufs2_dinode *)buf)[ino_to_fsbo(fs, inumber)];
sys/arch/landisk/stand/xxboot/ufs12.c
203
dp = &((struct ufs1_dinode *)buf)[ino_to_fsbo(fs, inumber)];
sys/arch/landisk/stand/xxboot/ufs12.c
209
fsbtodb(fs, ino_to_fsba(fs, inumber)), fs->fs_bsize, buf, NULL);
sys/arch/landisk/stand/xxboot/ufs12.c
212
free(buf, fs->fs_bsize);
sys/arch/landisk/stand/xxboot/ufs12.c
226
struct fs *fs = fp->f_fs;
sys/arch/landisk/stand/xxboot/ufs12.c
293
alloc(fs->fs_bsize);
sys/arch/landisk/stand/xxboot/ufs12.c
296
fsbtodb(fp->f_fs, ind_block_num), fs->fs_bsize,
sys/arch/landisk/stand/xxboot/ufs12.c
300
if (fp->f_blksize[level] != (size_t)fs->fs_bsize)
sys/arch/landisk/stand/xxboot/ufs12.c
328
struct fs *fs = fp->f_fs;
sys/arch/landisk/stand/xxboot/ufs12.c
335
off = blkoff(fs, fp->f_seekp);
sys/arch/landisk/stand/xxboot/ufs12.c
336
file_block = lblkno(fs, fp->f_seekp);
sys/arch/landisk/stand/xxboot/ufs12.c
338
block_size = dblksize(fs, &fp->f_di.i2, (u_int64_t)file_block);
sys/arch/landisk/stand/xxboot/ufs12.c
340
block_size = dblksize(fs, &fp->f_di.i1, (u_int64_t)file_block);
sys/arch/landisk/stand/xxboot/ufs12.c
348
fp->f_buf = alloc(fs->fs_bsize);
sys/arch/landisk/stand/xxboot/ufs12.c
356
fsbtodb(fs, disk_block),
sys/arch/landisk/stand/xxboot/ufs12.c
448
struct fs *fs;
sys/arch/landisk/stand/xxboot/ufs12.c
457
fs = alloc(SBSIZE);
sys/arch/landisk/stand/xxboot/ufs12.c
458
fp->f_fs = fs;
sys/arch/landisk/stand/xxboot/ufs12.c
462
SBLOCK, SBSIZE, (char *)fs, &buf_size);
sys/arch/landisk/stand/xxboot/ufs12.c
466
if (buf_size != SBSIZE || fs->fs_magic != FS_MAGIC ||
sys/arch/landisk/stand/xxboot/ufs12.c
467
(size_t)fs->fs_bsize > MAXBSIZE ||
sys/arch/landisk/stand/xxboot/ufs12.c
468
(size_t)fs->fs_bsize < sizeof(struct fs)) {
sys/arch/landisk/stand/xxboot/ufs12.c
471
SBLOCK_UFS2 / DEV_BSIZE, SBSIZE, (char *)fs, &buf_size);
sys/arch/landisk/stand/xxboot/ufs12.c
475
if (buf_size != SBSIZE || fs->fs_magic != FS_UFS2_MAGIC ||
sys/arch/landisk/stand/xxboot/ufs12.c
476
(u_int64_t)fs->fs_bsize > MAXBSIZE ||
sys/arch/landisk/stand/xxboot/ufs12.c
477
(u_int64_t)fs->fs_bsize < sizeof(struct fs)) {
sys/arch/landisk/stand/xxboot/ufs12.c
484
ffs_oldfscompat(fs);
sys/arch/landisk/stand/xxboot/ufs12.c
496
mult *= NINDIR(fs);
sys/arch/landisk/stand/xxboot/ufs12.c
587
if (link_len < (u_int64_t)fs->fs_maxsymlinklen) {
sys/arch/landisk/stand/xxboot/ufs12.c
600
fs = fp->f_fs;
sys/arch/landisk/stand/xxboot/ufs12.c
603
buf = alloc(fs->fs_bsize);
sys/arch/landisk/stand/xxboot/ufs12.c
610
F_READ, fsbtodb(fs, disk_block),
sys/arch/landisk/stand/xxboot/ufs12.c
611
fs->fs_bsize, buf, &buf_size);
sys/arch/landisk/stand/xxboot/ufs12.c
640
free(buf, fs->fs_bsize);
sys/arch/landisk/stand/xxboot/ufs12.c
83
struct fs *f_fs; /* pointer to super-block */
sys/arch/landisk/stand/xxboot/ufs12.c
845
ffs_oldfscompat(struct fs *fs)
sys/arch/landisk/stand/xxboot/ufs12.c
849
fs->fs_npsect = max(fs->fs_npsect, fs->fs_nsect); /* XXX */
sys/arch/landisk/stand/xxboot/ufs12.c
850
fs->fs_interleave = max(fs->fs_interleave, 1); /* XXX */
sys/arch/landisk/stand/xxboot/ufs12.c
851
if (fs->fs_postblformat == FS_42POSTBLFMT) /* XXX */
sys/arch/landisk/stand/xxboot/ufs12.c
852
fs->fs_nrpos = 8; /* XXX */
sys/arch/landisk/stand/xxboot/ufs12.c
853
if (fs->fs_inodefmt < FS_44INODEFMT) { /* XXX */
sys/arch/landisk/stand/xxboot/ufs12.c
854
quad_t sizepb = fs->fs_bsize; /* XXX */
sys/arch/landisk/stand/xxboot/ufs12.c
856
fs->fs_maxfilesize = fs->fs_bsize * NDADDR - 1; /* XXX */
sys/arch/landisk/stand/xxboot/ufs12.c
858
sizepb *= NINDIR(fs); /* XXX */
sys/arch/landisk/stand/xxboot/ufs12.c
859
fs->fs_maxfilesize += sizepb; /* XXX */
sys/arch/landisk/stand/xxboot/ufs12.c
861
fs->fs_qbmask = ~fs->fs_bmask; /* XXX */
sys/arch/landisk/stand/xxboot/ufs12.c
862
fs->fs_qfmask = ~fs->fs_fmask; /* XXX */
sys/arch/luna88k/stand/boot/conf.c
100
__CONCAT(fs,_stat), \
sys/arch/luna88k/stand/boot/conf.c
101
__CONCAT(fs,_readdir), \
sys/arch/luna88k/stand/boot/conf.c
102
__CONCAT(fs,_fchmod) }
sys/arch/luna88k/stand/boot/conf.c
94
#define FS_OPS(fs) { \
sys/arch/luna88k/stand/boot/conf.c
95
__CONCAT(fs,_open), \
sys/arch/luna88k/stand/boot/conf.c
96
__CONCAT(fs,_close), \
sys/arch/luna88k/stand/boot/conf.c
97
__CONCAT(fs,_read), \
sys/arch/luna88k/stand/boot/conf.c
98
__CONCAT(fs,_write), \
sys/arch/luna88k/stand/boot/conf.c
99
__CONCAT(fs,_seek), \
sys/arch/mips64/include/mips_opcode.h
118
unsigned fs: 5;
sys/arch/mips64/include/mips_opcode.h
129
unsigned fs: 5;
sys/arch/mips64/include/mips_opcode.h
78
unsigned fs: 5;
sys/arch/mips64/include/mips_opcode.h
87
unsigned fs: 5;
sys/arch/mips64/mips64/db_disasm.c
887
i.FRType.fd, i.FRType.fs, i.FRType.ft >> 2);
sys/arch/mips64/mips64/db_disasm.c
895
i.FRType.fd, i.FRType.fs, i.FRType.ft);
sys/arch/mips64/mips64/db_disasm.c
935
i.FQType.fs, i.FQType.ft);
sys/arch/mips64/mips64/db_disasm.c
949
i.FQType.fs, reg_name[i.FQType.ft],
sys/arch/mips64/mips64/db_disasm.c
954
i.FQType.fs, reg_name[i.FQType.ft],
sys/arch/mips64/mips64/fp_emulate.c
1016
fpu_cvt_l(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1028
raw = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1047
fpu_cvt_s(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1057
raw = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1075
fpu_cvt_w(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1087
raw = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1106
fpu_div(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1114
raw1 = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1129
fpu_floor_l(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1133
return fpu_int_l(p, tf, fmt, ft, fs, fd, FP_RM);
sys/arch/mips64/mips64/fp_emulate.c
1137
fpu_floor_w(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1141
return fpu_int_w(p, tf, fmt, ft, fs, fd, FP_RM);
sys/arch/mips64/mips64/fp_emulate.c
1146
uint fs, uint fd)
sys/arch/mips64/mips64/fp_emulate.c
1153
raw1 = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1173
fpu_mov(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1183
raw = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1190
fpu_movcf(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1206
raw = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1214
fpu_movn(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1224
raw = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1232
fpu_movz(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1242
raw = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1251
uint fs, uint fd)
sys/arch/mips64/mips64/fp_emulate.c
1258
raw1 = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1278
fpu_mul(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1286
raw1 = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1301
fpu_neg(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1311
raw = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1337
uint fs, uint fd)
sys/arch/mips64/mips64/fp_emulate.c
1344
raw1 = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1373
uint fs, uint fd)
sys/arch/mips64/mips64/fp_emulate.c
1380
raw1 = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1408
fpu_recip(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1418
raw = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1432
fpu_round_l(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1436
return fpu_int_l(p, tf, fmt, ft, fs, fd, FP_RN);
sys/arch/mips64/mips64/fp_emulate.c
1440
fpu_round_w(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1444
return fpu_int_w(p, tf, fmt, ft, fs, fd, FP_RN);
sys/arch/mips64/mips64/fp_emulate.c
1448
fpu_rsqrt(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1458
raw = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1478
fpu_sqrt(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1488
raw = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1502
fpu_sub(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1510
raw1 = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
1525
fpu_trunc_l(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1529
return fpu_int_l(p, tf, fmt, ft, fs, fd, FP_RZ);
sys/arch/mips64/mips64/fp_emulate.c
1533
fpu_trunc_w(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
1537
return fpu_int_w(p, tf, fmt, ft, fs, fd, FP_RZ);
sys/arch/mips64/mips64/fp_emulate.c
1562
[FPBASE + inst.FRType.fs];
sys/arch/mips64/mips64/fp_emulate.c
1567
if ((tf->sr & SR_FR_32) != 0 || (inst.FRType.fs & 1) == 0) {
sys/arch/mips64/mips64/fp_emulate.c
1570
fpu_load(p, tf, FMT_L, inst.FRType.fs);
sys/arch/mips64/mips64/fp_emulate.c
1577
switch (inst.FRType.fs) {
sys/arch/mips64/mips64/fp_emulate.c
1594
((uint64_t *)p->p_md.md_regs)[FPBASE + inst.FRType.fs] =
sys/arch/mips64/mips64/fp_emulate.c
1600
if ((tf->sr & SR_FR_32) != 0 || (inst.FRType.fs & 1) == 0) {
sys/arch/mips64/mips64/fp_emulate.c
1601
fpu_store(p, tf, FMT_L, inst.FRType.fs,
sys/arch/mips64/mips64/fp_emulate.c
1609
switch (inst.FRType.fs) {
sys/arch/mips64/mips64/fp_emulate.c
1687
if (inst.FQType.fs != 0)
sys/arch/mips64/mips64/fp_emulate.c
1703
if (inst.FQType.fs != 0)
sys/arch/mips64/mips64/fp_emulate.c
1726
if ((tf->sr & SR_FR_32) != 0 || (inst.FQType.fs & 1) == 0)
sys/arch/mips64/mips64/fp_emulate.c
1727
ddata = fpu_load(p, tf, FMT_L, inst.FQType.fs);
sys/arch/mips64/mips64/fp_emulate.c
1746
wdata = ((uint64_t *)p->p_md.md_regs)[FPBASE + inst.FQType.fs];
sys/arch/mips64/mips64/fp_emulate.c
523
uint ft, fs, fd;
sys/arch/mips64/mips64/fp_emulate.c
630
fs = inst.FRType.fs;
sys/arch/mips64/mips64/fp_emulate.c
633
if ((ft | fs | fd) & 1)
sys/arch/mips64/mips64/fp_emulate.c
643
fpu_c(p, tf, inst.FRType.fmt, ft, fs, fd, inst.FRType.func);
sys/arch/mips64/mips64/fp_emulate.c
645
return (*fpu_op)(p, tf, inst.FRType.fmt, ft, fs, fd);
sys/arch/mips64/mips64/fp_emulate.c
655
uint fr, ft, fs, fd;
sys/arch/mips64/mips64/fp_emulate.c
700
fs = inst.FQType.fs;
sys/arch/mips64/mips64/fp_emulate.c
703
if ((fr | ft | fs | fd) & 1)
sys/arch/mips64/mips64/fp_emulate.c
711
return (*fpu_op)(p, tf, inst.FRType.fmt, fr, ft, fs, fd);
sys/arch/mips64/mips64/fp_emulate.c
775
fpu_int_l(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
786
raw = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
805
fpu_int_w(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
816
raw = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
839
fpu_abs(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
849
raw = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
874
fpu_add(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
882
raw1 = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
897
fpu_c(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
911
raw1 = fpu_load(p, tf, fmt, fs);
sys/arch/mips64/mips64/fp_emulate.c
972
fpu_ceil_l(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
976
return fpu_int_l(p, tf, fmt, ft, fs, fd, FP_RP);
sys/arch/mips64/mips64/fp_emulate.c
980
fpu_ceil_w(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
984
return fpu_int_w(p, tf, fmt, ft, fs, fd, FP_RP);
sys/arch/mips64/mips64/fp_emulate.c
988
fpu_cvt_d(struct proc *p, struct trapframe *tf, uint fmt, uint ft, uint fs,
sys/arch/mips64/mips64/fp_emulate.c
998
raw = fpu_load(p, tf, fmt, fs);
sys/arch/sparc64/dev/ce4231.c
499
u_int8_t r, fs;
sys/arch/sparc64/dev/ce4231.c
504
fs = sc->sc_speed_bits | (sc->sc_format_bits << 5);
sys/arch/sparc64/dev/ce4231.c
506
fs |= FMT_STEREO;
sys/arch/sparc64/dev/ce4231.c
508
if (sc->sc_last_format == fs) {
sys/arch/sparc64/dev/ce4231.c
522
CS_WRITE(sc, AD1848_IDATA, fs);
sys/arch/sparc64/dev/ce4231.c
533
CS_WRITE(sc, AD1848_IDATA, fs);
sys/arch/sparc64/fpu/fpu.c
119
fpu_dumpstate(struct fpstate *fs)
sys/arch/sparc64/fpu/fpu.c
125
i, fs->fs_regs[i], ((i & 3) == 3) ? "\n" : " ");
sys/arch/sparc64/fpu/fpu.c
186
fpu_cleanup(struct proc *p, struct fpstate *fs, union instr instr,
sys/arch/sparc64/fpu/fpu.c
189
int i, fsr = fs->fs_fsr, error;
sys/arch/sparc64/fpu/fpu.c
229
fe.fe_fpstate = fs;
sys/arch/sparc64/fpu/fpu.c
240
fpu_codes[(fs->fs_fsr & FSR_CX) - 1],
sys/arch/sparc64/fpu/fpu.c
241
fpu_types[(fs->fs_fsr & FSR_CX) - 1], sv);
sys/arch/sparc64/fpu/fpu.c
276
struct fpstate *fs;
sys/arch/sparc64/fpu/fpu.c
285
fs = fe->fe_fpstate;
sys/arch/sparc64/fpu/fpu.c
286
fe->fe_fsr = fs->fs_fsr & ~FSR_CX;
sys/arch/sparc64/fpu/fpu.c
295
return (fpu_insn_fcmp(fs, fe, instr, 0));
sys/arch/sparc64/fpu/fpu.c
298
return (fpu_insn_fcmp(fs, fe, instr, 1));
sys/arch/sparc64/fpu/fpu.c
306
return (fpu_insn_fmovcc(p, fs, instr));
sys/arch/sparc64/fpu/fpu.c
314
return (fpu_insn_fmovr(p, fs, instr));
sys/arch/sparc64/fpu/fpu.c
355
return (fpu_insn_fmov(fs, fe, instr));
sys/arch/sparc64/fpu/fpu.c
358
return (fpu_insn_fneg(fs, fe, instr));
sys/arch/sparc64/fpu/fpu.c
361
return (fpu_insn_fabs(fs, fe, instr));
sys/arch/sparc64/fpu/fpu.c
402
fs->fs_fsr = (fsr & ~FSR_FTT) |
sys/arch/sparc64/fpu/fpu.c
409
fs->fs_fsr = fsr;
sys/arch/sparc64/fpu/fpu.c
410
fpu_fcopy(space, fs->fs_regs + rd, rdtype);
sys/arch/sparc64/fpu/fpu.c
412
DUMPSTATE(FPE_STATE, fs);
sys/arch/sparc64/fpu/fpu.c
420
fpu_insn_fmov(struct fpstate *fs, struct fpemu *fe, union instr instr)
sys/arch/sparc64/fpu/fpu.c
431
fpu_fcopy(fs->fs_regs + rs, fs->fs_regs + rd, rtype);
sys/arch/sparc64/fpu/fpu.c
432
fs->fs_fsr = fe->fe_fsr;
sys/arch/sparc64/fpu/fpu.c
440
fpu_insn_fabs(struct fpstate *fs, struct fpemu *fe, union instr instr)
sys/arch/sparc64/fpu/fpu.c
451
fpu_fcopy(fs->fs_regs + rs, fs->fs_regs + rd, rtype);
sys/arch/sparc64/fpu/fpu.c
452
fs->fs_regs[rd] = fs->fs_regs[rd] & ~(1U << 31);
sys/arch/sparc64/fpu/fpu.c
453
fs->fs_fsr = fe->fe_fsr;
sys/arch/sparc64/fpu/fpu.c
461
fpu_insn_fneg(struct fpstate *fs, struct fpemu *fe, union instr instr)
sys/arch/sparc64/fpu/fpu.c
472
fpu_fcopy(fs->fs_regs + rs, fs->fs_regs + rd, rtype);
sys/arch/sparc64/fpu/fpu.c
473
fs->fs_regs[rd] = fs->fs_regs[rd] ^ (1U << 31);
sys/arch/sparc64/fpu/fpu.c
474
fs->fs_fsr = fe->fe_fsr;
sys/arch/sparc64/fpu/fpu.c
588
fpu_insn_fcmp(struct fpstate *fs, struct fpemu *fe, union instr instr,
sys/arch/sparc64/fpu/fpu.c
613
fs->fs_fsr = (fsr & ~FSR_FTT) |
sys/arch/sparc64/fpu/fpu.c
619
fs->fs_fsr = fsr;
sys/arch/sparc64/fpu/fpu.c
773
fpu_insn_fmovcc(struct proc *p, struct fpstate *fs, union instr instr)
sys/arch/sparc64/fpu/fpu.c
788
cond = (fs->fs_fsr >> FSR_FCC_SHIFT) & FSR_FCC_MASK;
sys/arch/sparc64/fpu/fpu.c
791
cond = (fs->fs_fsr >> FSR_FCC1_SHIFT) & FSR_FCC_MASK;
sys/arch/sparc64/fpu/fpu.c
794
cond = (fs->fs_fsr >> FSR_FCC2_SHIFT) & FSR_FCC_MASK;
sys/arch/sparc64/fpu/fpu.c
797
cond = (fs->fs_fsr >> FSR_FCC3_SHIFT) & FSR_FCC_MASK;
sys/arch/sparc64/fpu/fpu.c
814
fpu_fcopy(fs->fs_regs + rs, fs->fs_regs + rd, rtype);
sys/arch/sparc64/fpu/fpu.c
822
fpu_insn_fmovr(struct proc *p, struct fpstate *fs, union instr instr)
sys/arch/sparc64/fpu/fpu.c
871
fpu_fcopy(fs->fs_regs + rs2, fs->fs_regs + rd, rtype);
sys/arch/sparc64/sparc64/emul.c
122
fs = p->p_md.md_fpstate;
sys/arch/sparc64/sparc64/emul.c
123
if (fs == NULL) {
sys/arch/sparc64/sparc64/emul.c
126
fs = malloc(sizeof(*fs), M_SUBPROC, M_WAITOK);
sys/arch/sparc64/sparc64/emul.c
127
*fs = initfpstate;
sys/arch/sparc64/sparc64/emul.c
128
p->p_md.md_fpstate = fs;
sys/arch/sparc64/sparc64/emul.c
141
bcopy(buf, &fs->fs_regs[freg], sizeof(buf));
sys/arch/sparc64/sparc64/emul.c
144
bcopy(&fs->fs_regs[freg], buf, sizeof(buf));
sys/arch/sparc64/sparc64/emul.c
71
struct fpstate *fs = p->p_md.md_fpstate;
sys/arch/sparc64/sparc64/trap.c
475
struct fpstate *fs = p->p_md.md_fpstate;
sys/arch/sparc64/sparc64/trap.c
477
if (fs == NULL) {
sys/arch/sparc64/sparc64/trap.c
479
fs = malloc((sizeof *fs), M_SUBPROC, M_WAITOK);
sys/arch/sparc64/sparc64/trap.c
480
*fs = initfpstate;
sys/arch/sparc64/sparc64/trap.c
481
p->p_md.md_fpstate = fs;
sys/arch/sparc64/sparc64/trap.c
490
loadfpstate(fs);
sys/dev/isa/ad1848.c
1106
u_char fs;
sys/dev/isa/ad1848.c
1118
fs = sc->speed_bits | sc->format_bits;
sys/dev/isa/ad1848.c
1121
fs |= FMT_STEREO;
sys/dev/isa/ad1848.c
1123
ad_write(sc, SP_CLOCK_DATA_FORMAT, fs);
sys/dev/isa/ad1848.c
1145
ad_write(sc, CS_REC_FORMAT, fs);
sys/dev/isa/fins.c
434
const struct fins_sensor *fs = &sc->fins_sensors[n];
sys/dev/isa/fins.c
437
data = fins_read_sens(sc, fs->fs_reg);
sys/dev/isa/fins.c
443
sensor->value = data * fs->fs_aux;
sys/dev/isa/fins.c
452
const struct fins_sensor *fs = &sc->fins_sensors[n];
sys/dev/isa/fins.c
462
data = fins_read_sens(sc, fs->fs_reg);
sys/dev/isa/fins.c
463
max = (sc->fins_tempsel & fs->fs_aux) ? 111 : 128;
sys/dev/isa/fins.c
480
const struct fins_sensor *fs = &sc->fins_sensors[n];
sys/dev/isa/fins.c
484
data = fins_read_sens(sc, fs->fs_reg);
sys/dev/isa/fins.c
495
const struct fins_sensor *fs = &sc->fins_sensors[n];
sys/dev/isa/fins.c
498
data = fins_read_sens_2(sc, fs->fs_reg);
sys/dev/pci/tga.c
1265
int fs, height, width;
sys/dev/pci/tga.c
1277
fs = ri->ri_font->stride;
sys/dev/pci/tga.c
1307
fr += fs;
sys/dev/rasops/rasops1.c
118
fs = 0; /* shutup gcc */
sys/dev/rasops/rasops1.c
122
fs = ri->ri_font->stride;
sys/dev/rasops/rasops1.c
146
fr += fs;
sys/dev/rasops/rasops1.c
156
fr += fs;
sys/dev/rasops/rasops1.c
195
fr += fs;
sys/dev/rasops/rasops1.c
209
fr += fs;
sys/dev/rasops/rasops1.c
233
int height, fs, rs, bg, fg;
sys/dev/rasops/rasops1.c
264
fs = ri->ri_font->stride;
sys/dev/rasops/rasops1.c
270
fr += fs;
sys/dev/rasops/rasops1.c
276
fr += fs;
sys/dev/rasops/rasops1.c
296
int height, fs, rs, bg, fg;
sys/dev/rasops/rasops1.c
327
fs = ri->ri_font->stride;
sys/dev/rasops/rasops1.c
334
fr += fs;
sys/dev/rasops/rasops1.c
341
fr += fs;
sys/dev/rasops/rasops1.c
87
u_int fs, rs, fb, bg, fg, lmask, rmask;
sys/dev/rasops/rasops15.c
211
int height, so, fs;
sys/dev/rasops/rasops15.c
251
fs = ri->ri_font->stride;
sys/dev/rasops/rasops15.c
262
fr += fs;
sys/dev/rasops/rasops15.c
287
int height, so, fs;
sys/dev/rasops/rasops15.c
327
fs = ri->ri_font->stride;
sys/dev/rasops/rasops15.c
342
fr += fs;
sys/dev/rasops/rasops15.c
367
int height, so, fs;
sys/dev/rasops/rasops15.c
408
fs = ri->ri_font->stride;
sys/dev/rasops/rasops15.c
428
fr += fs;
sys/dev/rasops/rasops24.c
232
int height, so, fs;
sys/dev/rasops/rasops24.c
272
fs = ri->ri_font->stride;
sys/dev/rasops/rasops24.c
285
fr += fs;
sys/dev/rasops/rasops24.c
310
int height, so, fs;
sys/dev/rasops/rasops24.c
351
fs = ri->ri_font->stride;
sys/dev/rasops/rasops24.c
369
fr += fs;
sys/dev/rasops/rasops24.c
395
int height, so, fs;
sys/dev/rasops/rasops24.c
437
fs = ri->ri_font->stride;
sys/dev/rasops/rasops24.c
461
fr += fs;
sys/dev/rasops/rasops32.c
111
fs = ri->ri_font->stride;
sys/dev/rasops/rasops32.c
204
fr += fs;
sys/dev/rasops/rasops32.c
67
int width, height, step, cnt, fs, b, f;
sys/dev/rasops/rasops4.c
101
int height, width, fs, rs, fb, bg, fg, lmask, rmask;
sys/dev/rasops/rasops4.c
131
fs = 0; /* shutup gcc */
sys/dev/rasops/rasops4.c
135
fs = ri->ri_font->stride;
sys/dev/rasops/rasops4.c
191
fr += fs;
sys/dev/rasops/rasops4.c
254
int height, fs, rs;
sys/dev/rasops/rasops4.c
297
fs = ri->ri_font->stride;
sys/dev/rasops/rasops4.c
302
fr += fs;
sys/dev/rasops/rasops4.c
326
int height, fs, rs;
sys/dev/rasops/rasops4.c
370
fs = ri->ri_font->stride;
sys/dev/rasops/rasops4.c
376
fr += fs;
sys/dev/rasops/rasops4.c
401
int height, fs, rs;
sys/dev/rasops/rasops4.c
446
fs = ri->ri_font->stride;
sys/dev/rasops/rasops4.c
453
fr += fs;
sys/dev/rasops/rasops8.c
132
fs = ri->ri_font->stride;
sys/dev/rasops/rasops8.c
137
fr += fs;
sys/dev/rasops/rasops8.c
200
int height, fs;
sys/dev/rasops/rasops8.c
239
fs = ri->ri_font->stride;
sys/dev/rasops/rasops8.c
245
fr += fs;
sys/dev/rasops/rasops8.c
268
int height, fs;
sys/dev/rasops/rasops8.c
309
fs = ri->ri_font->stride;
sys/dev/rasops/rasops8.c
316
fr += fs;
sys/dev/rasops/rasops8.c
339
int height, fs;
sys/dev/rasops/rasops8.c
376
fs = ri->ri_font->stride;
sys/dev/rasops/rasops8.c
384
fr += fs;
sys/dev/rasops/rasops8.c
98
int width, height, cnt, fs, fb;
sys/dev/sbus/cs4231.c
534
u_int8_t r, fs;
sys/dev/sbus/cs4231.c
539
fs = sc->sc_speed_bits | (sc->sc_format_bits << 5);
sys/dev/sbus/cs4231.c
541
fs |= FMT_STEREO;
sys/dev/sbus/cs4231.c
552
CS_WRITE(sc, AD1848_IDATA, fs);
sys/dev/sbus/cs4231.c
563
CS_WRITE(sc, AD1848_IDATA, fs);
sys/dev/sbus/zx.c
721
int fs, i, fg, bg, ul;
sys/dev/sbus/zx.c
753
fs = font->stride;
sys/dev/sbus/zx.c
767
fb += fs;
sys/dev/sbus/zx.c
773
fb += fs;
sys/lib/libsa/ufs.c
105
static void ffs_oldfscompat(struct fs *);
sys/lib/libsa/ufs.c
115
struct fs *fs = fp->f_fs;
sys/lib/libsa/ufs.c
123
buf = alloc(fs->fs_bsize);
sys/lib/libsa/ufs.c
126
fsbtodb(fs, (daddr32_t)ino_to_fsba(fs, inumber)), fs->fs_bsize,
sys/lib/libsa/ufs.c
130
if (rsize != (size_t)fs->fs_bsize) {
sys/lib/libsa/ufs.c
139
fp->f_di = dp[ino_to_fsbo(fs, inumber)];
sys/lib/libsa/ufs.c
154
free(buf, fs->fs_bsize);
sys/lib/libsa/ufs.c
165
struct fs *fs = fp->f_fs;
sys/lib/libsa/ufs.c
173
buf = alloc(fs->fs_bsize);
sys/lib/libsa/ufs.c
176
fsbtodb(fs, (daddr32_t)ino_to_fsba(fs, inumber)), fs->fs_bsize,
sys/lib/libsa/ufs.c
180
if (rsize != (size_t)fs->fs_bsize) {
sys/lib/libsa/ufs.c
188
dp = &((struct ufs1_dinode *)buf)[ino_to_fsbo(fs, inumber)];
sys/lib/libsa/ufs.c
194
fsbtodb(fs, (daddr32_t)ino_to_fsba(fs, inumber)), fs->fs_bsize,
sys/lib/libsa/ufs.c
198
free(buf, fs->fs_bsize);
sys/lib/libsa/ufs.c
211
struct fs *fs = fp->f_fs;
sys/lib/libsa/ufs.c
272
alloc(fs->fs_bsize);
sys/lib/libsa/ufs.c
275
fsbtodb(fp->f_fs, ind_block_num), fs->fs_bsize,
sys/lib/libsa/ufs.c
279
if (fp->f_blksize[level] != (size_t)fs->fs_bsize)
sys/lib/libsa/ufs.c
307
struct fs *fs = fp->f_fs;
sys/lib/libsa/ufs.c
313
off = blkoff(fs, fp->f_seekp);
sys/lib/libsa/ufs.c
314
file_block = lblkno(fs, fp->f_seekp);
sys/lib/libsa/ufs.c
315
block_size = dblksize(fs, &fp->f_di, (u_int64_t)file_block);
sys/lib/libsa/ufs.c
323
fp->f_buf = alloc(fs->fs_bsize);
sys/lib/libsa/ufs.c
331
fsbtodb(fs, disk_block),
sys/lib/libsa/ufs.c
414
struct fs *fs;
sys/lib/libsa/ufs.c
422
fs = alloc(SBSIZE);
sys/lib/libsa/ufs.c
423
fp->f_fs = fs;
sys/lib/libsa/ufs.c
426
SBLOCK, SBSIZE, (char *)fs, &buf_size);
sys/lib/libsa/ufs.c
430
if (buf_size != SBSIZE || fs->fs_magic != FS_MAGIC ||
sys/lib/libsa/ufs.c
431
(size_t)fs->fs_bsize > MAXBSIZE ||
sys/lib/libsa/ufs.c
432
(size_t)fs->fs_bsize < sizeof(struct fs)) {
sys/lib/libsa/ufs.c
437
ffs_oldfscompat(fs);
sys/lib/libsa/ufs.c
449
mult *= NINDIR(fs);
sys/lib/libsa/ufs.c
528
if (link_len < (u_int64_t)fs->fs_maxsymlinklen) {
sys/lib/libsa/ufs.c
535
fs = fp->f_fs;
sys/lib/libsa/ufs.c
538
buf = alloc(fs->fs_bsize);
sys/lib/libsa/ufs.c
545
F_READ, fsbtodb(fs, disk_block),
sys/lib/libsa/ufs.c
546
fs->fs_bsize, buf, &buf_size);
sys/lib/libsa/ufs.c
575
free(buf, fs->fs_bsize);
sys/lib/libsa/ufs.c
750
ffs_oldfscompat(struct fs *fs)
sys/lib/libsa/ufs.c
754
fs->fs_npsect = max(fs->fs_npsect, fs->fs_nsect); /* XXX */
sys/lib/libsa/ufs.c
755
fs->fs_interleave = max(fs->fs_interleave, 1); /* XXX */
sys/lib/libsa/ufs.c
756
if (fs->fs_postblformat == FS_42POSTBLFMT) /* XXX */
sys/lib/libsa/ufs.c
757
fs->fs_nrpos = 8; /* XXX */
sys/lib/libsa/ufs.c
758
if (fs->fs_inodefmt < FS_44INODEFMT) { /* XXX */
sys/lib/libsa/ufs.c
759
quad_t sizepb = fs->fs_bsize; /* XXX */
sys/lib/libsa/ufs.c
761
fs->fs_maxfilesize = fs->fs_bsize * NDADDR - 1; /* XXX */
sys/lib/libsa/ufs.c
763
sizepb *= NINDIR(fs); /* XXX */
sys/lib/libsa/ufs.c
764
fs->fs_maxfilesize += sizepb; /* XXX */
sys/lib/libsa/ufs.c
766
fs->fs_qbmask = ~fs->fs_bmask; /* XXX */
sys/lib/libsa/ufs.c
767
fs->fs_qfmask = ~fs->fs_fmask; /* XXX */
sys/lib/libsa/ufs.c
82
struct fs *f_fs; /* pointer to super-block */
sys/lib/libsa/ufs2.c
104
static void ffs_oldfscompat(struct fs *);
sys/lib/libsa/ufs2.c
114
struct fs *fs = fp->f_fs;
sys/lib/libsa/ufs2.c
122
buf = alloc(fs->fs_bsize);
sys/lib/libsa/ufs2.c
125
fsbtodb(fs, ino_to_fsba(fs, inumber)), fs->fs_bsize, buf, &rsize);
sys/lib/libsa/ufs2.c
128
if (rsize != (size_t)fs->fs_bsize) {
sys/lib/libsa/ufs2.c
137
fp->f_di = dp[ino_to_fsbo(fs, inumber)];
sys/lib/libsa/ufs2.c
152
free(buf, fs->fs_bsize);
sys/lib/libsa/ufs2.c
163
struct fs *fs = fp->f_fs;
sys/lib/libsa/ufs2.c
171
buf = alloc(fs->fs_bsize);
sys/lib/libsa/ufs2.c
174
fsbtodb(fs, ino_to_fsba(fs, inumber)), fs->fs_bsize, buf, &rsize);
sys/lib/libsa/ufs2.c
177
if (rsize != (size_t)fs->fs_bsize) {
sys/lib/libsa/ufs2.c
185
dp = &((struct ufs2_dinode *)buf)[ino_to_fsbo(fs, inumber)];
sys/lib/libsa/ufs2.c
191
fsbtodb(fs, ino_to_fsba(fs, inumber)), fs->fs_bsize, buf, NULL);
sys/lib/libsa/ufs2.c
194
free(buf, fs->fs_bsize);
sys/lib/libsa/ufs2.c
207
struct fs *fs = fp->f_fs;
sys/lib/libsa/ufs2.c
268
alloc(fs->fs_bsize);
sys/lib/libsa/ufs2.c
271
fsbtodb(fp->f_fs, ind_block_num), fs->fs_bsize,
sys/lib/libsa/ufs2.c
275
if (fp->f_blksize[level] != (size_t)fs->fs_bsize)
sys/lib/libsa/ufs2.c
303
struct fs *fs = fp->f_fs;
sys/lib/libsa/ufs2.c
309
off = blkoff(fs, fp->f_seekp);
sys/lib/libsa/ufs2.c
310
file_block = lblkno(fs, fp->f_seekp);
sys/lib/libsa/ufs2.c
311
block_size = dblksize(fs, &fp->f_di, (u_int64_t)file_block);
sys/lib/libsa/ufs2.c
319
fp->f_buf = alloc(fs->fs_bsize);
sys/lib/libsa/ufs2.c
327
fsbtodb(fs, disk_block),
sys/lib/libsa/ufs2.c
410
struct fs *fs;
sys/lib/libsa/ufs2.c
418
fs = alloc(SBSIZE);
sys/lib/libsa/ufs2.c
419
fp->f_fs = fs;
sys/lib/libsa/ufs2.c
422
SBLOCK_UFS2 / DEV_BSIZE, SBSIZE, (char *)fs, &buf_size);
sys/lib/libsa/ufs2.c
426
if (buf_size != SBSIZE || fs->fs_magic != FS_UFS2_MAGIC ||
sys/lib/libsa/ufs2.c
427
(u_int64_t)fs->fs_bsize > MAXBSIZE ||
sys/lib/libsa/ufs2.c
428
(u_int64_t)fs->fs_bsize < sizeof(struct fs)) {
sys/lib/libsa/ufs2.c
433
ffs_oldfscompat(fs);
sys/lib/libsa/ufs2.c
445
mult *= NINDIR(fs);
sys/lib/libsa/ufs2.c
524
if (link_len < (u_int64_t)fs->fs_maxsymlinklen) {
sys/lib/libsa/ufs2.c
531
fs = fp->f_fs;
sys/lib/libsa/ufs2.c
534
buf = alloc(fs->fs_bsize);
sys/lib/libsa/ufs2.c
541
F_READ, fsbtodb(fs, disk_block),
sys/lib/libsa/ufs2.c
542
fs->fs_bsize, buf, &buf_size);
sys/lib/libsa/ufs2.c
571
free(buf, fs->fs_bsize);
sys/lib/libsa/ufs2.c
746
ffs_oldfscompat(struct fs *fs)
sys/lib/libsa/ufs2.c
750
fs->fs_npsect = max(fs->fs_npsect, fs->fs_nsect); /* XXX */
sys/lib/libsa/ufs2.c
751
fs->fs_interleave = max(fs->fs_interleave, 1); /* XXX */
sys/lib/libsa/ufs2.c
752
if (fs->fs_postblformat == FS_42POSTBLFMT) /* XXX */
sys/lib/libsa/ufs2.c
753
fs->fs_nrpos = 8; /* XXX */
sys/lib/libsa/ufs2.c
754
if (fs->fs_inodefmt < FS_44INODEFMT) { /* XXX */
sys/lib/libsa/ufs2.c
755
quad_t sizepb = fs->fs_bsize; /* XXX */
sys/lib/libsa/ufs2.c
757
fs->fs_maxfilesize = fs->fs_bsize * NDADDR - 1; /* XXX */
sys/lib/libsa/ufs2.c
759
sizepb *= NINDIR(fs); /* XXX */
sys/lib/libsa/ufs2.c
760
fs->fs_maxfilesize += sizepb; /* XXX */
sys/lib/libsa/ufs2.c
762
fs->fs_qbmask = ~fs->fs_bmask; /* XXX */
sys/lib/libsa/ufs2.c
763
fs->fs_qfmask = ~fs->fs_fmask; /* XXX */
sys/lib/libsa/ufs2.c
81
struct fs *f_fs; /* pointer to super-block */
sys/ufs/ext2fs/ext2fs.h
225
e2fs_overflow(struct m_ext2fs *fs, off_t lower, off_t value)
sys/ufs/ext2fs/ext2fs.h
227
return (value < lower || value > fs->e2fs_maxfilesize);
sys/ufs/ext2fs/ext2fs.h
401
#define fsbtodb(fs, b) ((b) << (fs)->e2fs_fsbtodb)
sys/ufs/ext2fs/ext2fs.h
402
#define dbtofsb(fs, b) ((b) >> (fs)->e2fs_fsbtodb)
sys/ufs/ext2fs/ext2fs.h
410
#define ino_to_cg(fs, x) (((x) - 1) / (fs)->e2fs.e2fs_ipg)
sys/ufs/ext2fs/ext2fs.h
411
#define ino_to_fsba(fs, x) \
sys/ufs/ext2fs/ext2fs.h
412
((fs)->e2fs_gd[ino_to_cg(fs, x)].ext2bgd_i_tables + \
sys/ufs/ext2fs/ext2fs.h
413
(((x)-1) % (fs)->e2fs.e2fs_ipg)/(fs)->e2fs_ipb)
sys/ufs/ext2fs/ext2fs.h
414
#define ino_to_fsbo(fs, x) (((x)-1) % (fs)->e2fs_ipb)
sys/ufs/ext2fs/ext2fs.h
420
#define dtog(fs, d) (((d) - (fs)->e2fs.e2fs_first_dblock) / (fs)->e2fs.e2fs_fpg)
sys/ufs/ext2fs/ext2fs.h
421
#define dtogd(fs, d) \
sys/ufs/ext2fs/ext2fs.h
422
(((d) - (fs)->e2fs.e2fs_first_dblock) % (fs)->e2fs.e2fs_fpg)
sys/ufs/ext2fs/ext2fs.h
429
#define blkoff(fs, loc) /* calculates (loc % fs->e2fs_bsize) */ \
sys/ufs/ext2fs/ext2fs.h
430
((loc) & (fs)->e2fs_qbmask)
sys/ufs/ext2fs/ext2fs.h
431
#define lblktosize(fs, blk) /* calculates (blk * fs->e2fs_bsize) */ \
sys/ufs/ext2fs/ext2fs.h
432
((blk) << (fs)->e2fs_bshift)
sys/ufs/ext2fs/ext2fs.h
433
#define lblkno(fs, loc) /* calculates (loc / fs->e2fs_bsize) */ \
sys/ufs/ext2fs/ext2fs.h
434
((loc) >> (fs)->e2fs_bshift)
sys/ufs/ext2fs/ext2fs.h
435
#define blkroundup(fs, size) /* calculates roundup(size, fs->e2fs_bsize) */ \
sys/ufs/ext2fs/ext2fs.h
436
(((size) + (fs)->e2fs_qbmask) & (fs)->e2fs_bmask)
sys/ufs/ext2fs/ext2fs.h
437
#define fragroundup(fs, size) /* calculates roundup(size, fs->e2fs_bsize) */ \
sys/ufs/ext2fs/ext2fs.h
438
(((size) + (fs)->e2fs_qbmask) & (fs)->e2fs_bmask)
sys/ufs/ext2fs/ext2fs.h
443
#define freespace(fs) \
sys/ufs/ext2fs/ext2fs.h
444
((fs)->e2fs.e2fs_fbcount - (fs)->e2fs.e2fs_rbcount)
sys/ufs/ext2fs/ext2fs.h
449
#define NINDIR(fs) ((fs)->e2fs_bsize / sizeof(u_int32_t))
sys/ufs/ext2fs/ext2fs_alloc.c
100
cg = ino_to_cg(fs, ip->i_number);
sys/ufs/ext2fs/ext2fs_alloc.c
102
cg = dtog(fs, bpref);
sys/ufs/ext2fs/ext2fs_alloc.c
103
bno = ext2fs_hashalloc(ip, cg, bpref, fs->e2fs_bsize, ext2fs_alloccg);
sys/ufs/ext2fs/ext2fs_alloc.c
105
ip->i_e2fs_nblock += btodb(fs->e2fs_bsize);
sys/ufs/ext2fs/ext2fs_alloc.c
111
ext2fs_fserr(fs, cred->cr_uid, "file system full");
sys/ufs/ext2fs/ext2fs_alloc.c
112
uprintf("\n%s: write failed, file system is full\n", fs->e2fs_fsmnt);
sys/ufs/ext2fs/ext2fs_alloc.c
136
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_alloc.c
143
fs = pip->i_e2fs;
sys/ufs/ext2fs/ext2fs_alloc.c
144
if (fs->e2fs.e2fs_ficount == 0)
sys/ufs/ext2fs/ext2fs_alloc.c
148
cg = ext2fs_dirpref(fs);
sys/ufs/ext2fs/ext2fs_alloc.c
150
cg = ino_to_cg(fs, pip->i_number);
sys/ufs/ext2fs/ext2fs_alloc.c
151
ipref = cg * fs->e2fs.e2fs_ipg + 1;
sys/ufs/ext2fs/ext2fs_alloc.c
164
fs->e2fs_fsmnt);
sys/ufs/ext2fs/ext2fs_alloc.c
178
ext2fs_fserr(fs, cred->cr_uid, "out of inodes");
sys/ufs/ext2fs/ext2fs_alloc.c
179
uprintf("\n%s: create/symlink failed, no inodes free\n", fs->e2fs_fsmnt);
sys/ufs/ext2fs/ext2fs_alloc.c
191
ext2fs_dirpref(struct m_ext2fs *fs)
sys/ufs/ext2fs/ext2fs_alloc.c
195
avgifree = fs->e2fs.e2fs_ficount / fs->e2fs_ncg;
sys/ufs/ext2fs/ext2fs_alloc.c
198
for (cg = 0; cg < fs->e2fs_ncg; cg++)
sys/ufs/ext2fs/ext2fs_alloc.c
199
if ( fs->e2fs_gd[cg].ext2bgd_nifree >= avgifree) {
sys/ufs/ext2fs/ext2fs_alloc.c
200
if (mincg == -1 || fs->e2fs_gd[cg].ext2bgd_nbfree > maxspace) {
sys/ufs/ext2fs/ext2fs_alloc.c
202
maxspace = fs->e2fs_gd[cg].ext2bgd_nbfree;
sys/ufs/ext2fs/ext2fs_alloc.c
222
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_alloc.c
225
fs = ip->i_e2fs;
sys/ufs/ext2fs/ext2fs_alloc.c
250
cg = ino_to_cg(fs, ip->i_number);
sys/ufs/ext2fs/ext2fs_alloc.c
251
return fs->e2fs.e2fs_bpg * cg + fs->e2fs.e2fs_first_dblock + 1;
sys/ufs/ext2fs/ext2fs_alloc.c
266
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_alloc.c
270
fs = ip->i_e2fs;
sys/ufs/ext2fs/ext2fs_alloc.c
280
for (i = 1; i < fs->e2fs_ncg; i *= 2) {
sys/ufs/ext2fs/ext2fs_alloc.c
282
if (cg >= fs->e2fs_ncg)
sys/ufs/ext2fs/ext2fs_alloc.c
283
cg -= fs->e2fs_ncg;
sys/ufs/ext2fs/ext2fs_alloc.c
293
cg = (icg + 2) % fs->e2fs_ncg;
sys/ufs/ext2fs/ext2fs_alloc.c
294
for (i = 2; i < fs->e2fs_ncg; i++) {
sys/ufs/ext2fs/ext2fs_alloc.c
299
if (cg == fs->e2fs_ncg)
sys/ufs/ext2fs/ext2fs_alloc.c
314
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_alloc.c
320
fs = ip->i_e2fs;
sys/ufs/ext2fs/ext2fs_alloc.c
321
if (fs->e2fs_gd[cg].ext2bgd_nbfree == 0)
sys/ufs/ext2fs/ext2fs_alloc.c
323
error = bread(ip->i_devvp, fsbtodb(fs,
sys/ufs/ext2fs/ext2fs_alloc.c
324
fs->e2fs_gd[cg].ext2bgd_b_bitmap), (int)fs->e2fs_bsize, &bp);
sys/ufs/ext2fs/ext2fs_alloc.c
325
if (error || fs->e2fs_gd[cg].ext2bgd_nbfree == 0) {
sys/ufs/ext2fs/ext2fs_alloc.c
331
if (dtog(fs, bpref) != cg)
sys/ufs/ext2fs/ext2fs_alloc.c
334
bpref = dtogd(fs, bpref);
sys/ufs/ext2fs/ext2fs_alloc.c
350
start = dtogd(fs, bpref) / NBBY;
sys/ufs/ext2fs/ext2fs_alloc.c
353
end = howmany(fs->e2fs.e2fs_fpg, NBBY) - start;
sys/ufs/ext2fs/ext2fs_alloc.c
367
bno = ext2fs_mapsearch(fs, bbp, bpref);
sys/ufs/ext2fs/ext2fs_alloc.c
372
__func__, cg, bno, fs->e2fs_fsmnt);
sys/ufs/ext2fs/ext2fs_alloc.c
376
fs->e2fs.e2fs_fbcount--;
sys/ufs/ext2fs/ext2fs_alloc.c
377
fs->e2fs_gd[cg].ext2bgd_nbfree--;
sys/ufs/ext2fs/ext2fs_alloc.c
378
fs->e2fs_fmod = 1;
sys/ufs/ext2fs/ext2fs_alloc.c
380
return (cg * fs->e2fs.e2fs_fpg + fs->e2fs.e2fs_first_dblock + bno);
sys/ufs/ext2fs/ext2fs_alloc.c
395
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_alloc.c
401
fs = ip->i_e2fs;
sys/ufs/ext2fs/ext2fs_alloc.c
402
if (fs->e2fs_gd[cg].ext2bgd_nifree == 0)
sys/ufs/ext2fs/ext2fs_alloc.c
404
error = bread(ip->i_devvp, fsbtodb(fs,
sys/ufs/ext2fs/ext2fs_alloc.c
405
fs->e2fs_gd[cg].ext2bgd_i_bitmap), (int)fs->e2fs_bsize, &bp);
sys/ufs/ext2fs/ext2fs_alloc.c
412
ipref %= fs->e2fs.e2fs_ipg;
sys/ufs/ext2fs/ext2fs_alloc.c
417
len = howmany(fs->e2fs.e2fs_ipg - ipref, NBBY);
sys/ufs/ext2fs/ext2fs_alloc.c
425
cg, ipref, fs->e2fs_fsmnt);
sys/ufs/ext2fs/ext2fs_alloc.c
438
printf("fs = %s\n", fs->e2fs_fsmnt);
sys/ufs/ext2fs/ext2fs_alloc.c
443
fs->e2fs.e2fs_ficount--;
sys/ufs/ext2fs/ext2fs_alloc.c
444
fs->e2fs_gd[cg].ext2bgd_nifree--;
sys/ufs/ext2fs/ext2fs_alloc.c
445
fs->e2fs_fmod = 1;
sys/ufs/ext2fs/ext2fs_alloc.c
447
fs->e2fs_gd[cg].ext2bgd_ndirs++;
sys/ufs/ext2fs/ext2fs_alloc.c
450
return (cg * fs->e2fs.e2fs_ipg + ipref + 1);
sys/ufs/ext2fs/ext2fs_alloc.c
462
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_alloc.c
467
fs = ip->i_e2fs;
sys/ufs/ext2fs/ext2fs_alloc.c
468
cg = dtog(fs, bno);
sys/ufs/ext2fs/ext2fs_alloc.c
469
if (bno >= fs->e2fs.e2fs_bcount) {
sys/ufs/ext2fs/ext2fs_alloc.c
471
ext2fs_fserr(fs, ip->i_e2fs_uid, "bad block");
sys/ufs/ext2fs/ext2fs_alloc.c
475
fsbtodb(fs, fs->e2fs_gd[cg].ext2bgd_b_bitmap),
sys/ufs/ext2fs/ext2fs_alloc.c
476
(int)fs->e2fs_bsize, &bp);
sys/ufs/ext2fs/ext2fs_alloc.c
482
bno = dtogd(fs, bno);
sys/ufs/ext2fs/ext2fs_alloc.c
485
__func__, ip->i_dev, bno, fs->e2fs_fsmnt);
sys/ufs/ext2fs/ext2fs_alloc.c
488
fs->e2fs.e2fs_fbcount++;
sys/ufs/ext2fs/ext2fs_alloc.c
489
fs->e2fs_gd[cg].ext2bgd_nbfree++;
sys/ufs/ext2fs/ext2fs_alloc.c
491
fs->e2fs_fmod = 1;
sys/ufs/ext2fs/ext2fs_alloc.c
503
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_alloc.c
508
fs = pip->i_e2fs;
sys/ufs/ext2fs/ext2fs_alloc.c
509
if (ino > fs->e2fs.e2fs_icount || ino < EXT2_FIRSTINO)
sys/ufs/ext2fs/ext2fs_alloc.c
511
pip->i_dev, ino, fs->e2fs_fsmnt);
sys/ufs/ext2fs/ext2fs_alloc.c
512
cg = ino_to_cg(fs, ino);
sys/ufs/ext2fs/ext2fs_alloc.c
514
fsbtodb(fs, fs->e2fs_gd[cg].ext2bgd_i_bitmap),
sys/ufs/ext2fs/ext2fs_alloc.c
515
(int)fs->e2fs_bsize, &bp);
sys/ufs/ext2fs/ext2fs_alloc.c
521
ino = (ino - 1) % fs->e2fs.e2fs_ipg;
sys/ufs/ext2fs/ext2fs_alloc.c
524
pip->i_dev, ino, fs->e2fs_fsmnt);
sys/ufs/ext2fs/ext2fs_alloc.c
525
if (fs->e2fs_ronly == 0)
sys/ufs/ext2fs/ext2fs_alloc.c
529
fs->e2fs.e2fs_ficount++;
sys/ufs/ext2fs/ext2fs_alloc.c
530
fs->e2fs_gd[cg].ext2bgd_nifree++;
sys/ufs/ext2fs/ext2fs_alloc.c
532
fs->e2fs_gd[cg].ext2bgd_ndirs--;
sys/ufs/ext2fs/ext2fs_alloc.c
534
fs->e2fs_fmod = 1;
sys/ufs/ext2fs/ext2fs_alloc.c
546
ext2fs_mapsearch(struct m_ext2fs *fs, char *bbp, u_int32_t bpref)
sys/ufs/ext2fs/ext2fs_alloc.c
556
start = dtogd(fs, bpref) / NBBY;
sys/ufs/ext2fs/ext2fs_alloc.c
559
len = howmany(fs->e2fs.e2fs_fpg, NBBY) - start;
sys/ufs/ext2fs/ext2fs_alloc.c
567
start, len, fs->e2fs_fsmnt);
sys/ufs/ext2fs/ext2fs_alloc.c
579
printf("fs = %s\n", fs->e2fs_fsmnt);
sys/ufs/ext2fs/ext2fs_alloc.c
591
ext2fs_fserr(struct m_ext2fs *fs, uid_t uid, char *cp)
sys/ufs/ext2fs/ext2fs_alloc.c
593
log(LOG_ERR, "uid %u on %s: %s\n", uid, fs->e2fs_fsmnt, cp);
sys/ufs/ext2fs/ext2fs_alloc.c
83
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_alloc.c
88
fs = ip->i_e2fs;
sys/ufs/ext2fs/ext2fs_alloc.c
93
if (fs->e2fs.e2fs_fbcount == 0)
sys/ufs/ext2fs/ext2fs_alloc.c
95
if (cred->cr_uid != 0 && freespace(fs) <= 0)
sys/ufs/ext2fs/ext2fs_alloc.c
97
if (bpref >= fs->e2fs.e2fs_bcount)
sys/ufs/ext2fs/ext2fs_balloc.c
100
bp = getblk(vp, bn, fs->e2fs_bsize, 0, INFSLP);
sys/ufs/ext2fs/ext2fs_balloc.c
101
bp->b_blkno = fsbtodb(fs, newb);
sys/ufs/ext2fs/ext2fs_balloc.c
132
bp = getblk(vp, indirs[1].in_lbn, fs->e2fs_bsize, 0, INFSLP);
sys/ufs/ext2fs/ext2fs_balloc.c
133
bp->b_blkno = fsbtodb(fs, newb);
sys/ufs/ext2fs/ext2fs_balloc.c
150
error = bread(vp, indirs[i].in_lbn, (int)fs->e2fs_bsize, &bp);
sys/ufs/ext2fs/ext2fs_balloc.c
173
nbp = getblk(vp, indirs[i].in_lbn, fs->e2fs_bsize, 0, INFSLP);
sys/ufs/ext2fs/ext2fs_balloc.c
174
nbp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ext2fs/ext2fs_balloc.c
221
nbp = getblk(vp, lbn, fs->e2fs_bsize, 0, INFSLP);
sys/ufs/ext2fs/ext2fs_balloc.c
222
nbp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ext2fs/ext2fs_balloc.c
230
error = bread(vp, lbn, (int)fs->e2fs_bsize, &nbp);
sys/ufs/ext2fs/ext2fs_balloc.c
236
nbp = getblk(vp, lbn, fs->e2fs_bsize, 0, INFSLP);
sys/ufs/ext2fs/ext2fs_balloc.c
237
nbp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ext2fs/ext2fs_balloc.c
249
deallocated += fs->e2fs_bsize;
sys/ufs/ext2fs/ext2fs_balloc.c
258
(int)fs->e2fs_bsize, &bp);
sys/ufs/ext2fs/ext2fs_balloc.c
271
bp = getblk(vp, indirs[i].in_lbn, (int)fs->e2fs_bsize,
sys/ufs/ext2fs/ext2fs_balloc.c
58
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_balloc.c
70
fs = ip->i_e2fs;
sys/ufs/ext2fs/ext2fs_balloc.c
79
error = bread(vp, bn, fs->e2fs_bsize, &bp);
sys/ufs/ext2fs/ext2fs_bmap.c
103
fs = ip->i_e2fs;
sys/ufs/ext2fs/ext2fs_bmap.c
110
ext4_ext_find_extent(fs, ip, bn, &path);
sys/ufs/ext2fs/ext2fs_bmap.c
115
if ((*bnp = fsbtodb(fs, pos)) == 0)
sys/ufs/ext2fs/ext2fs_bmap.c
97
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_bswap.c
113
e2fs_i_bswap(struct m_ext2fs *fs, struct ext2fs_dinode *old,
sys/ufs/ext2fs/ext2fs_bswap.c
138
if (EXT2_DINODE_SIZE(fs) <= EXT2_REV0_DINODE_SIZE)
sys/ufs/ext2fs/ext2fs_dinode.h
140
#define EXT2_DINODE_SIZE(fs) ((fs)->e2fs.e2fs_rev > E2FS_REV0 ? \
sys/ufs/ext2fs/ext2fs_dinode.h
141
(fs)->e2fs.e2fs_inode_size : \
sys/ufs/ext2fs/ext2fs_dinode.h
157
# define e2fs_iload(fs, old, new) \
sys/ufs/ext2fs/ext2fs_dinode.h
158
memcpy((new),(old), MIN(EXT2_DINODE_SIZE(fs), sizeof(*new)))
sys/ufs/ext2fs/ext2fs_dinode.h
159
# define e2fs_isave(fs, old, new) \
sys/ufs/ext2fs/ext2fs_dinode.h
160
memcpy((new),(old), MIN(EXT2_DINODE_SIZE(fs), sizeof(*new)))
sys/ufs/ext2fs/ext2fs_dinode.h
164
# define e2fs_iload(fs, old, new) e2fs_i_bswap((fs), (old), (new))
sys/ufs/ext2fs/ext2fs_dinode.h
165
# define e2fs_isave(fs, old, new) e2fs_i_bswap((fs), (old), (new))
sys/ufs/ext2fs/ext2fs_extents.c
129
ext4_ext_find_extent(struct m_ext2fs *fs, struct inode *ip,
sys/ufs/ext2fs/ext2fs_extents.c
157
error = bread(ip->i_devvp, fsbtodb(fs, nblk), fs->e2fs_fsize,
sys/ufs/ext2fs/ext2fs_extents.h
96
struct ext4_extent_path *ext4_ext_find_extent(struct m_ext2fs *fs,
sys/ufs/ext2fs/ext2fs_inode.c
157
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_inode.c
168
fs = ip->i_e2fs;
sys/ufs/ext2fs/ext2fs_inode.c
170
fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
sys/ufs/ext2fs/ext2fs_inode.c
171
(int)fs->e2fs_bsize, &bp);
sys/ufs/ext2fs/ext2fs_inode.c
178
(ino_to_fsbo(fs, ip->i_number) * EXT2_DINODE_SIZE(fs));
sys/ufs/ext2fs/ext2fs_inode.c
190
e2fs_isave(fs, ip->i_e2din, (struct ext2fs_dinode *)cp);
sys/ufs/ext2fs/ext2fs_inode.c
213
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_inode.c
244
fs = oip->i_e2fs;
sys/ufs/ext2fs/ext2fs_inode.c
253
if (length > fs->fs_maxfilesize)
sys/ufs/ext2fs/ext2fs_inode.c
256
offset = blkoff(fs, length - 1);
sys/ufs/ext2fs/ext2fs_inode.c
257
lbn = lblkno(fs, length - 1);
sys/ufs/ext2fs/ext2fs_inode.c
282
offset = blkoff(fs, length);
sys/ufs/ext2fs/ext2fs_inode.c
286
lbn = lblkno(fs, length);
sys/ufs/ext2fs/ext2fs_inode.c
295
size = fs->e2fs_bsize;
sys/ufs/ext2fs/ext2fs_inode.c
311
lastblock = lblkno(fs, length + fs->e2fs_bsize - 1) - 1;
sys/ufs/ext2fs/ext2fs_inode.c
313
lastiblock[DOUBLE] = lastiblock[SINGLE] - NINDIR(fs);
sys/ufs/ext2fs/ext2fs_inode.c
314
lastiblock[TRIPLE] = lastiblock[DOUBLE] - NINDIR(fs) * NINDIR(fs);
sys/ufs/ext2fs/ext2fs_inode.c
315
nblocks = btodb(fs->e2fs_bsize);
sys/ufs/ext2fs/ext2fs_inode.c
349
indir_lbn[DOUBLE] = indir_lbn[SINGLE] - NINDIR(fs) -1;
sys/ufs/ext2fs/ext2fs_inode.c
350
indir_lbn[TRIPLE] = indir_lbn[DOUBLE] - NINDIR(fs) * NINDIR(fs) - 1;
sys/ufs/ext2fs/ext2fs_inode.c
355
fsbtodb(fs, bn), lastiblock[level], level, &count);
sys/ufs/ext2fs/ext2fs_inode.c
378
blocksreleased += btodb(fs->e2fs_bsize);
sys/ufs/ext2fs/ext2fs_inode.c
426
struct m_ext2fs *fs = ip->i_e2fs;
sys/ufs/ext2fs/ext2fs_inode.c
441
factor *= NINDIR(fs);
sys/ufs/ext2fs/ext2fs_inode.c
445
nblocks = btodb(fs->e2fs_bsize);
sys/ufs/ext2fs/ext2fs_inode.c
455
bp = getblk(vp, lbn, (int)fs->e2fs_bsize, 0, INFSLP);
sys/ufs/ext2fs/ext2fs_inode.c
475
copy = malloc(fs->e2fs_bsize, M_TEMP, M_WAITOK);
sys/ufs/ext2fs/ext2fs_inode.c
476
memcpy(copy, bap, fs->e2fs_bsize);
sys/ufs/ext2fs/ext2fs_inode.c
478
(NINDIR(fs) - (last + 1)) * sizeof(u_int32_t));
sys/ufs/ext2fs/ext2fs_inode.c
488
for (i = NINDIR(fs) - 1,
sys/ufs/ext2fs/ext2fs_inode.c
495
error = ext2fs_indirtrunc(ip, nlbn, fsbtodb(fs, nb),
sys/ufs/ext2fs/ext2fs_inode.c
513
error = ext2fs_indirtrunc(ip, nlbn, fsbtodb(fs, nb),
sys/ufs/ext2fs/ext2fs_inode.c
522
free(copy, M_TEMP, fs->e2fs_bsize);
sys/ufs/ext2fs/ext2fs_inode.c
75
struct m_ext2fs *fs = ip->i_e2fs;
sys/ufs/ext2fs/ext2fs_inode.c
77
if (size <= fs->e2fs_maxfilesize) {
sys/ufs/ext2fs/ext2fs_inode.c
87
if (fs->e2fs.e2fs_rev <= E2FS_REV0)
sys/ufs/ext2fs/ext2fs_inode.c
90
if (!(fs->e2fs.e2fs_features_rocompat & EXT2F_ROCOMPAT_LARGE_FILE)) {
sys/ufs/ext2fs/ext2fs_inode.c
91
fs->e2fs.e2fs_features_rocompat |= EXT2F_ROCOMPAT_LARGE_FILE;
sys/ufs/ext2fs/ext2fs_inode.c
92
fs->e2fs_fmod = 1;
sys/ufs/ext2fs/ext2fs_lookup.c
135
struct m_ext2fs *fs = VTOI(vp)->i_e2fs;
sys/ufs/ext2fs/ext2fs_lookup.c
149
entries = (uio->uio_offset + e2fs_count) & (fs->e2fs_bsize - 1);
sys/ufs/ext2fs/ext2fs_readwrite.c
110
lbn = lblkno(fs, uio->uio_offset);
sys/ufs/ext2fs/ext2fs_readwrite.c
112
size = fs->e2fs_bsize;
sys/ufs/ext2fs/ext2fs_readwrite.c
113
blkoffset = blkoff(fs, uio->uio_offset);
sys/ufs/ext2fs/ext2fs_readwrite.c
114
xfersize = fs->e2fs_bsize - blkoffset;
sys/ufs/ext2fs/ext2fs_readwrite.c
120
if (lblktosize(fs, nextlbn) >= ext2fs_size(ip))
sys/ufs/ext2fs/ext2fs_readwrite.c
123
int nextsize = fs->e2fs_bsize;
sys/ufs/ext2fs/ext2fs_readwrite.c
160
ext4_ext_read(struct vnode *vp, struct inode *ip, struct m_ext2fs *fs, struct uio *uio)
sys/ufs/ext2fs/ext2fs_readwrite.c
180
lbn = lblkno(fs, uio->uio_offset);
sys/ufs/ext2fs/ext2fs_readwrite.c
181
size = fs->e2fs_bsize;
sys/ufs/ext2fs/ext2fs_readwrite.c
182
blkoffset = blkoff(fs, uio->uio_offset);
sys/ufs/ext2fs/ext2fs_readwrite.c
184
xfersize = fs->e2fs_fsize - blkoffset;
sys/ufs/ext2fs/ext2fs_readwrite.c
191
ext4_ext_find_extent(fs, ip, lbn, &path);
sys/ufs/ext2fs/ext2fs_readwrite.c
209
error = bread(ip->i_devvp, fsbtodb(fs, pos), size, &bp);
sys/ufs/ext2fs/ext2fs_readwrite.c
240
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_readwrite.c
284
fs = ip->i_e2fs;
sys/ufs/ext2fs/ext2fs_readwrite.c
285
if (e2fs_overflow(fs, uio->uio_resid, uio->uio_offset + uio->uio_resid))
sys/ufs/ext2fs/ext2fs_readwrite.c
297
lbn = lblkno(fs, uio->uio_offset);
sys/ufs/ext2fs/ext2fs_readwrite.c
298
blkoffset = blkoff(fs, uio->uio_offset);
sys/ufs/ext2fs/ext2fs_readwrite.c
299
xfersize = fs->e2fs_bsize - blkoffset;
sys/ufs/ext2fs/ext2fs_readwrite.c
302
if (fs->e2fs_bsize > xfersize)
sys/ufs/ext2fs/ext2fs_readwrite.c
320
size = fs->e2fs_bsize - bp->b_resid;
sys/ufs/ext2fs/ext2fs_readwrite.c
343
else if (xfersize + blkoffset == fs->e2fs_bsize)
sys/ufs/ext2fs/ext2fs_readwrite.c
69
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_readwrite.c
74
fs = ip->i_e2fs;
sys/ufs/ext2fs/ext2fs_readwrite.c
77
return ext4_ext_read(vp, ip, fs, uio);
sys/ufs/ext2fs/ext2fs_readwrite.c
79
return ext2_ind_read(vp, ip, fs, uio);
sys/ufs/ext2fs/ext2fs_readwrite.c
83
ext2_ind_read(struct vnode *vp, struct inode *ip, struct m_ext2fs *fs,
sys/ufs/ext2fs/ext2fs_subr.c
102
if ((error = bread(vp, lbn, fs->e2fs_bsize, &bp)) != 0) {
sys/ufs/ext2fs/ext2fs_subr.c
107
*res = (char *)bp->b_data + blkoff(fs, offset);
sys/ufs/ext2fs/ext2fs_subr.c
63
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_subr.c
69
fs = ip->i_e2fs;
sys/ufs/ext2fs/ext2fs_subr.c
70
lbn = lblkno(fs, offset);
sys/ufs/ext2fs/ext2fs_subr.c
77
if (ext4_ext_find_extent(fs, ip, lbn, &path) == NULL ||
sys/ufs/ext2fs/ext2fs_subr.c
86
error = bread(ip->i_devvp, fsbtodb(fs, pos), fs->e2fs_bsize, &bp);
sys/ufs/ext2fs/ext2fs_subr.c
93
*res = (char *)bp->b_data + blkoff(fs, offset);
sys/ufs/ext2fs/ext2fs_vfsops.c
1020
struct m_ext2fs *fs = mp->um_e2fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
1025
e2fs_sbsave(&fs->e2fs, (struct ext2fs *) bp->b_data);
sys/ufs/ext2fs/ext2fs_vfsops.c
1030
fs->e2fs_fmod = 0;
sys/ufs/ext2fs/ext2fs_vfsops.c
1037
struct m_ext2fs *fs = mp->um_e2fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
1042
for (i = 0; i < fs->e2fs_ngdb; i++) {
sys/ufs/ext2fs/ext2fs_vfsops.c
1043
bp = getblk(mp->um_devvp, fsbtodb(fs, ((fs->e2fs_bsize>1024)?0:1)+i+1),
sys/ufs/ext2fs/ext2fs_vfsops.c
1044
fs->e2fs_bsize, 0, INFSLP);
sys/ufs/ext2fs/ext2fs_vfsops.c
1045
e2fs_cgsave(&fs->e2fs_gd[i* fs->e2fs_bsize / sizeof(struct ext2_gd)], (struct ext2_gd*)bp->b_data, fs->e2fs_bsize);
sys/ufs/ext2fs/ext2fs_vfsops.c
1059
e2fs_sbcheck(struct ext2fs *fs, int ronly)
sys/ufs/ext2fs/ext2fs_vfsops.c
1064
tmp = letoh16(fs->e2fs_magic);
sys/ufs/ext2fs/ext2fs_vfsops.c
1070
tmp = letoh32(fs->e2fs_log_bsize);
sys/ufs/ext2fs/ext2fs_vfsops.c
1078
if (fs->e2fs_bpg == 0) {
sys/ufs/ext2fs/ext2fs_vfsops.c
108
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
1083
tmp = letoh32(fs->e2fs_rev);
sys/ufs/ext2fs/ext2fs_vfsops.c
1091
tmp = letoh32(fs->e2fs_first_ino);
sys/ufs/ext2fs/ext2fs_vfsops.c
1097
tmp = letoh32(fs->e2fs_features_incompat);
sys/ufs/ext2fs/ext2fs_vfsops.c
1119
tmp = letoh32(fs->e2fs_features_rocompat) & ~EXT2F_ROCOMPAT_SUPP;
sys/ufs/ext2fs/ext2fs_vfsops.c
134
fs = ump->um_e2fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
135
memset(fs->e2fs_fsmnt, 0, sizeof(fs->e2fs_fsmnt));
sys/ufs/ext2fs/ext2fs_vfsops.c
136
strlcpy(fs->e2fs_fsmnt, mp->mnt_stat.f_mntonname, sizeof(fs->e2fs_fsmnt));
sys/ufs/ext2fs/ext2fs_vfsops.c
137
if (fs->e2fs.e2fs_rev > E2FS_REV0) {
sys/ufs/ext2fs/ext2fs_vfsops.c
138
memset(fs->e2fs.e2fs_fsmnt, 0, sizeof(fs->e2fs.e2fs_fsmnt));
sys/ufs/ext2fs/ext2fs_vfsops.c
139
strlcpy(fs->e2fs.e2fs_fsmnt, mp->mnt_stat.f_mntonname,
sys/ufs/ext2fs/ext2fs_vfsops.c
140
sizeof(fs->e2fs.e2fs_fsmnt));
sys/ufs/ext2fs/ext2fs_vfsops.c
144
inittodr(fs->e2fs.e2fs_wtime);
sys/ufs/ext2fs/ext2fs_vfsops.c
160
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
171
fs = ump->um_e2fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
172
if (fs->e2fs_ronly == 0 && (mp->mnt_flag & MNT_RDONLY)) {
sys/ufs/ext2fs/ext2fs_vfsops.c
179
(fs->e2fs.e2fs_state & E2FS_ERRORS) == 0) {
sys/ufs/ext2fs/ext2fs_vfsops.c
180
fs->e2fs.e2fs_state = E2FS_ISCLEAN;
sys/ufs/ext2fs/ext2fs_vfsops.c
185
fs->e2fs_ronly = 1;
sys/ufs/ext2fs/ext2fs_vfsops.c
192
if (fs->e2fs_ronly && (mp->mnt_flag & MNT_WANTRDWR)) {
sys/ufs/ext2fs/ext2fs_vfsops.c
193
fs->e2fs_ronly = 0;
sys/ufs/ext2fs/ext2fs_vfsops.c
194
if (fs->e2fs.e2fs_state == E2FS_ISCLEAN)
sys/ufs/ext2fs/ext2fs_vfsops.c
195
fs->e2fs.e2fs_state = 0;
sys/ufs/ext2fs/ext2fs_vfsops.c
197
fs->e2fs.e2fs_state = E2FS_ERRORS;
sys/ufs/ext2fs/ext2fs_vfsops.c
198
fs->e2fs_fmod = 1;
sys/ufs/ext2fs/ext2fs_vfsops.c
245
fs = ump->um_e2fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
247
memset(fs->e2fs_fsmnt, 0, sizeof(fs->e2fs_fsmnt));
sys/ufs/ext2fs/ext2fs_vfsops.c
248
strlcpy(fs->e2fs_fsmnt, path, sizeof(fs->e2fs_fsmnt));
sys/ufs/ext2fs/ext2fs_vfsops.c
249
if (fs->e2fs.e2fs_rev > E2FS_REV0) {
sys/ufs/ext2fs/ext2fs_vfsops.c
250
memset(fs->e2fs.e2fs_fsmnt, 0, sizeof(fs->e2fs.e2fs_fsmnt));
sys/ufs/ext2fs/ext2fs_vfsops.c
251
strlcpy(fs->e2fs.e2fs_fsmnt, mp->mnt_stat.f_mntonname,
sys/ufs/ext2fs/ext2fs_vfsops.c
252
sizeof(fs->e2fs.e2fs_fsmnt));
sys/ufs/ext2fs/ext2fs_vfsops.c
254
memcpy(mp->mnt_stat.f_mntonname, fs->e2fs_fsmnt, MNAMELEN);
sys/ufs/ext2fs/ext2fs_vfsops.c
261
if (fs->e2fs_fmod != 0) { /* XXX */
sys/ufs/ext2fs/ext2fs_vfsops.c
262
fs->e2fs_fmod = 0;
sys/ufs/ext2fs/ext2fs_vfsops.c
263
if (fs->e2fs.e2fs_state == 0)
sys/ufs/ext2fs/ext2fs_vfsops.c
264
fs->e2fs.e2fs_wtime = gettime();
sys/ufs/ext2fs/ext2fs_vfsops.c
287
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
323
fsbtodb(era->fs, ino_to_fsba(era->fs, ip->i_number)),
sys/ufs/ext2fs/ext2fs_vfsops.c
324
(int)era->fs->e2fs_bsize, &bp);
sys/ufs/ext2fs/ext2fs_vfsops.c
330
(ino_to_fsbo(era->fs, ip->i_number) * EXT2_DINODE_SIZE(era->fs));
sys/ufs/ext2fs/ext2fs_vfsops.c
331
e2fs_iload(era->fs, (struct ext2fs_dinode *)cp, ip->i_e2din);
sys/ufs/ext2fs/ext2fs_vfsops.c
338
ext2fs_maxfilesize(struct m_ext2fs *fs)
sys/ufs/ext2fs/ext2fs_vfsops.c
340
bool huge = fs->e2fs.e2fs_features_rocompat & EXT2F_ROCOMPAT_HUGE_FILE;
sys/ufs/ext2fs/ext2fs_vfsops.c
341
off_t b = fs->e2fs_bsize / 4;
sys/ufs/ext2fs/ext2fs_vfsops.c
345
logically = (12ULL + b + b*b + b*b*b) * fs->e2fs_bsize;
sys/ufs/ext2fs/ext2fs_vfsops.c
351
e2fs_sbfill(struct vnode *devvp, struct m_ext2fs *fs)
sys/ufs/ext2fs/ext2fs_vfsops.c
357
fs->e2fs_ncg = howmany(fs->e2fs.e2fs_bcount - fs->e2fs.e2fs_first_dblock,
sys/ufs/ext2fs/ext2fs_vfsops.c
358
fs->e2fs.e2fs_bpg);
sys/ufs/ext2fs/ext2fs_vfsops.c
359
fs->e2fs_fsbtodb = fs->e2fs.e2fs_log_bsize + 1;
sys/ufs/ext2fs/ext2fs_vfsops.c
360
fs->e2fs_bsize = 1024 << fs->e2fs.e2fs_log_bsize;
sys/ufs/ext2fs/ext2fs_vfsops.c
361
fs->e2fs_bshift = LOG_MINBSIZE + fs->e2fs.e2fs_log_bsize;
sys/ufs/ext2fs/ext2fs_vfsops.c
362
fs->e2fs_fsize = 1024 << fs->e2fs.e2fs_log_fsize;
sys/ufs/ext2fs/ext2fs_vfsops.c
364
fs->e2fs_qbmask = fs->e2fs_bsize - 1;
sys/ufs/ext2fs/ext2fs_vfsops.c
365
fs->e2fs_bmask = ~fs->e2fs_qbmask;
sys/ufs/ext2fs/ext2fs_vfsops.c
367
fs->e2fs_ipb = fs->e2fs_bsize / EXT2_DINODE_SIZE(fs);
sys/ufs/ext2fs/ext2fs_vfsops.c
368
fs->e2fs_itpg = fs->e2fs.e2fs_ipg / fs->e2fs_ipb;
sys/ufs/ext2fs/ext2fs_vfsops.c
371
fs->e2fs_ngdb = howmany(fs->e2fs_ncg,
sys/ufs/ext2fs/ext2fs_vfsops.c
372
fs->e2fs_bsize / sizeof(struct ext2_gd));
sys/ufs/ext2fs/ext2fs_vfsops.c
373
fs->e2fs_gd = mallocarray(fs->e2fs_ngdb, fs->e2fs_bsize,
sys/ufs/ext2fs/ext2fs_vfsops.c
376
for (i = 0; i < fs->e2fs_ngdb; ++i) {
sys/ufs/ext2fs/ext2fs_vfsops.c
377
daddr_t dblk = ((fs->e2fs_bsize > 1024) ? 0 : 1) + i + 1;
sys/ufs/ext2fs/ext2fs_vfsops.c
378
size_t gdesc = i * fs->e2fs_bsize / sizeof(struct ext2_gd);
sys/ufs/ext2fs/ext2fs_vfsops.c
381
error = bread(devvp, fsbtodb(fs, dblk), fs->e2fs_bsize, &bp);
sys/ufs/ext2fs/ext2fs_vfsops.c
383
size_t gdescs_space = fs->e2fs_ngdb * fs->e2fs_bsize;
sys/ufs/ext2fs/ext2fs_vfsops.c
385
free(fs->e2fs_gd, M_UFSMNT, gdescs_space);
sys/ufs/ext2fs/ext2fs_vfsops.c
386
fs->e2fs_gd = NULL;
sys/ufs/ext2fs/ext2fs_vfsops.c
392
e2fs_cgload(gd, fs->e2fs_gd + gdesc, fs->e2fs_bsize);
sys/ufs/ext2fs/ext2fs_vfsops.c
397
if (!(fs->e2fs.e2fs_features_rocompat & EXT2F_ROCOMPAT_LARGE_FILE) ||
sys/ufs/ext2fs/ext2fs_vfsops.c
398
(fs->e2fs.e2fs_rev == E2FS_REV0))
sys/ufs/ext2fs/ext2fs_vfsops.c
399
fs->e2fs_maxfilesize = INT_MAX;
sys/ufs/ext2fs/ext2fs_vfsops.c
401
fs->e2fs_maxfilesize = ext2fs_maxfilesize(fs);
sys/ufs/ext2fs/ext2fs_vfsops.c
403
if (fs->e2fs.e2fs_features_incompat & EXT2F_INCOMPAT_EXTENTS)
sys/ufs/ext2fs/ext2fs_vfsops.c
404
fs->e2fs_maxfilesize *= 4;
sys/ufs/ext2fs/ext2fs_vfsops.c
427
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
459
fs = VFSTOUFS(mountp)->um_e2fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
464
e2fs_sbload(newfs, &fs->e2fs);
sys/ufs/ext2fs/ext2fs_vfsops.c
465
if ((error = e2fs_sbfill(devvp, fs)) != 0)
sys/ufs/ext2fs/ext2fs_vfsops.c
470
era.fs = fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
486
struct ext2fs *fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
523
fs = (struct ext2fs *)bp->b_data;
sys/ufs/ext2fs/ext2fs_vfsops.c
524
error = e2fs_sbcheck(fs, ronly);
sys/ufs/ext2fs/ext2fs_vfsops.c
536
e2fs_sbload(fs, &ump->um_e2fs->e2fs);
sys/ufs/ext2fs/ext2fs_vfsops.c
541
fs = &ump->um_e2fs->e2fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
546
if (fs->e2fs_state == E2FS_ISCLEAN)
sys/ufs/ext2fs/ext2fs_vfsops.c
547
fs->e2fs_state = 0;
sys/ufs/ext2fs/ext2fs_vfsops.c
549
fs->e2fs_state = E2FS_ERRORS;
sys/ufs/ext2fs/ext2fs_vfsops.c
590
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
600
fs = ump->um_e2fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
601
gdescs_space = fs->e2fs_ngdb * fs->e2fs_bsize;
sys/ufs/ext2fs/ext2fs_vfsops.c
603
if (!fs->e2fs_ronly && ext2fs_cgupdate(ump, MNT_WAIT) == 0 &&
sys/ufs/ext2fs/ext2fs_vfsops.c
604
(fs->e2fs.e2fs_state & E2FS_ERRORS) == 0) {
sys/ufs/ext2fs/ext2fs_vfsops.c
605
fs->e2fs.e2fs_state = E2FS_ISCLEAN;
sys/ufs/ext2fs/ext2fs_vfsops.c
612
(void)VOP_CLOSE(ump->um_devvp, fs->e2fs_ronly ? FREAD : FREAD|FWRITE,
sys/ufs/ext2fs/ext2fs_vfsops.c
615
free(fs->e2fs_gd, M_UFSMNT, gdescs_space);
sys/ufs/ext2fs/ext2fs_vfsops.c
616
free(fs, M_UFSMNT, sizeof *fs);
sys/ufs/ext2fs/ext2fs_vfsops.c
654
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
659
fs = ump->um_e2fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
660
if (fs->e2fs.e2fs_magic != E2FS_MAGIC)
sys/ufs/ext2fs/ext2fs_vfsops.c
667
fs->e2fs_itpg;
sys/ufs/ext2fs/ext2fs_vfsops.c
668
overhead = fs->e2fs.e2fs_first_dblock +
sys/ufs/ext2fs/ext2fs_vfsops.c
669
fs->e2fs_ncg * overhead_per_group;
sys/ufs/ext2fs/ext2fs_vfsops.c
670
if (fs->e2fs.e2fs_rev > E2FS_REV0 &&
sys/ufs/ext2fs/ext2fs_vfsops.c
671
fs->e2fs.e2fs_features_rocompat & EXT2F_ROCOMPAT_SPARSE_SUPER) {
sys/ufs/ext2fs/ext2fs_vfsops.c
672
for (i = 0, ngroups = 0; i < fs->e2fs_ncg; i++) {
sys/ufs/ext2fs/ext2fs_vfsops.c
677
ngroups = fs->e2fs_ncg;
sys/ufs/ext2fs/ext2fs_vfsops.c
679
overhead += ngroups * (1 + fs->e2fs_ngdb);
sys/ufs/ext2fs/ext2fs_vfsops.c
681
sbp->f_bsize = fs->e2fs_bsize;
sys/ufs/ext2fs/ext2fs_vfsops.c
682
sbp->f_iosize = fs->e2fs_bsize;
sys/ufs/ext2fs/ext2fs_vfsops.c
683
sbp->f_blocks = fs->e2fs.e2fs_bcount - overhead;
sys/ufs/ext2fs/ext2fs_vfsops.c
684
sbp->f_bfree = fs->e2fs.e2fs_fbcount;
sys/ufs/ext2fs/ext2fs_vfsops.c
685
sbp->f_bavail = sbp->f_bfree - fs->e2fs.e2fs_rbcount;
sys/ufs/ext2fs/ext2fs_vfsops.c
686
sbp->f_files = fs->e2fs.e2fs_icount;
sys/ufs/ext2fs/ext2fs_vfsops.c
687
sbp->f_favail = sbp->f_ffree = fs->e2fs.e2fs_ficount;
sys/ufs/ext2fs/ext2fs_vfsops.c
755
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
759
fs = ump->um_e2fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
760
if (fs->e2fs_ronly != 0) { /* XXX */
sys/ufs/ext2fs/ext2fs_vfsops.c
761
printf("fs = %s\n", fs->e2fs_fsmnt);
sys/ufs/ext2fs/ext2fs_vfsops.c
791
state = fs->e2fs.e2fs_state;
sys/ufs/ext2fs/ext2fs_vfsops.c
792
fmod = fs->e2fs_fmod;
sys/ufs/ext2fs/ext2fs_vfsops.c
793
if (stall && fs->e2fs_ronly == 0) {
sys/ufs/ext2fs/ext2fs_vfsops.c
794
fs->e2fs_fmod = 1;
sys/ufs/ext2fs/ext2fs_vfsops.c
796
if ((fs->e2fs.e2fs_state & E2FS_ERRORS) == 0)
sys/ufs/ext2fs/ext2fs_vfsops.c
797
fs->e2fs.e2fs_state = E2FS_ISCLEAN;
sys/ufs/ext2fs/ext2fs_vfsops.c
803
fs->e2fs.e2fs_state = 0;
sys/ufs/ext2fs/ext2fs_vfsops.c
810
if (fs->e2fs_fmod != 0) {
sys/ufs/ext2fs/ext2fs_vfsops.c
811
fs->e2fs_fmod = 0;
sys/ufs/ext2fs/ext2fs_vfsops.c
812
fs->e2fs.e2fs_wtime = gettime();
sys/ufs/ext2fs/ext2fs_vfsops.c
816
fs->e2fs.e2fs_state = state;
sys/ufs/ext2fs/ext2fs_vfsops.c
817
fs->e2fs_fmod = fmod;
sys/ufs/ext2fs/ext2fs_vfsops.c
830
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
861
ip->i_e2fs = fs = ump->um_e2fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
885
error = bread(ump->um_devvp, fsbtodb(fs, ino_to_fsba(fs, ino)),
sys/ufs/ext2fs/ext2fs_vfsops.c
886
(int)fs->e2fs_bsize, &bp);
sys/ufs/ext2fs/ext2fs_vfsops.c
901
+ EXT2_DINODE_SIZE(fs) * ino_to_fsbo(fs, ino));
sys/ufs/ext2fs/ext2fs_vfsops.c
904
e2fs_iload(fs, dp, ip->i_e2din);
sys/ufs/ext2fs/ext2fs_vfsops.c
974
struct m_ext2fs *fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
977
fs = VFSTOUFS(mp)->um_e2fs;
sys/ufs/ext2fs/ext2fs_vfsops.c
979
ufhp->ufid_ino > fs->e2fs_ncg * fs->e2fs.e2fs_ipg)
sys/ufs/ffs/ffs_alloc.c
1007
fs->fs_cstotal.cs_nffree -= frags;
sys/ufs/ffs/ffs_alloc.c
1008
fs->fs_cs(fs, cg).cs_nffree -= frags;
sys/ufs/ffs/ffs_alloc.c
1009
fs->fs_fmod = 1;
sys/ufs/ffs/ffs_alloc.c
1014
blkno = cgbase(fs, cg) + bno;
sys/ufs/ffs/ffs_alloc.c
1027
struct fs *fs;
sys/ufs/ffs/ffs_alloc.c
103
struct fs *fs;
sys/ufs/ffs/ffs_alloc.c
1033
fs = ip->i_fs;
sys/ufs/ffs/ffs_alloc.c
1039
} else if ((cgbpref = dtog(fs, bpref)) != cgp->cg_cgx) {
sys/ufs/ffs/ffs_alloc.c
1041
if (bpref < cgdata(fs, cgbpref))
sys/ufs/ffs/ffs_alloc.c
1042
bpref = cgmeta(fs, cgp->cg_cgx);
sys/ufs/ffs/ffs_alloc.c
1044
bpref = cgdata(fs, cgp->cg_cgx);
sys/ufs/ffs/ffs_alloc.c
1049
bno = dtogd(fs, blknum(fs, bpref));
sys/ufs/ffs/ffs_alloc.c
1050
if (ffs_isblock(fs, blksfree, fragstoblks(fs, bno)))
sys/ufs/ffs/ffs_alloc.c
1055
bno = ffs_mapsearch(fs, cgp, bpref, (int) fs->fs_frag);
sys/ufs/ffs/ffs_alloc.c
1060
if (bno >= dtogd(fs, cgdata(fs, cgp->cg_cgx)))
sys/ufs/ffs/ffs_alloc.c
1064
blkno = fragstoblks(fs, bno);
sys/ufs/ffs/ffs_alloc.c
1065
ffs_clrblock(fs, blksfree, blkno);
sys/ufs/ffs/ffs_alloc.c
1066
ffs_clusteracct(fs, cgp, blkno, -1);
sys/ufs/ffs/ffs_alloc.c
1068
fs->fs_cstotal.cs_nbfree--;
sys/ufs/ffs/ffs_alloc.c
1069
fs->fs_cs(fs, cgp->cg_cgx).cs_nbfree--;
sys/ufs/ffs/ffs_alloc.c
1071
if (fs->fs_magic != FS_UFS2_MAGIC) {
sys/ufs/ffs/ffs_alloc.c
1072
cylno = cbtocylno(fs, bno);
sys/ufs/ffs/ffs_alloc.c
1073
cg_blks(fs, cgp, cylno)[cbtorpos(fs, bno)]--;
sys/ufs/ffs/ffs_alloc.c
1077
fs->fs_fmod = 1;
sys/ufs/ffs/ffs_alloc.c
1078
blkno = cgbase(fs, cgp->cg_cgx) + bno;
sys/ufs/ffs/ffs_alloc.c
1087
struct fs *fs;
sys/ufs/ffs/ffs_alloc.c
109
fs = ip->i_fs;
sys/ufs/ffs/ffs_alloc.c
1102
fs = ip->i_fs;
sys/ufs/ffs/ffs_alloc.c
1103
if (fs->fs_cs(fs, cg).cs_nifree == 0)
sys/ufs/ffs/ffs_alloc.c
1106
if (!(bp = ffs_cgread(fs, ip, cg)))
sys/ufs/ffs/ffs_alloc.c
111
if ((u_int)size > fs->fs_bsize || fragoff(fs, size) != 0) {
sys/ufs/ffs/ffs_alloc.c
1127
ipref %= fs->fs_ipg;
sys/ufs/ffs/ffs_alloc.c
113
ip->i_dev, fs->fs_bsize, size, fs->fs_fsmnt);
sys/ufs/ffs/ffs_alloc.c
1137
len = howmany(fs->fs_ipg - cgp->cg_irotor, NBBY);
sys/ufs/ffs/ffs_alloc.c
1154
cg, cgp->cg_irotor, fs->fs_fsmnt);
sys/ufs/ffs/ffs_alloc.c
1177
printf("fs = %s\n", fs->fs_fsmnt);
sys/ufs/ffs/ffs_alloc.c
119
if (size == fs->fs_bsize && fs->fs_cstotal.cs_nbfree == 0)
sys/ufs/ffs/ffs_alloc.c
1190
if (fs->fs_magic == FS_UFS2_MAGIC &&
sys/ufs/ffs/ffs_alloc.c
1192
ipref + INOPB(fs) > cgp->cg_initediblk &&
sys/ufs/ffs/ffs_alloc.c
1196
ibp = getblk(ip->i_devvp, fsbtodb(fs,
sys/ufs/ffs/ffs_alloc.c
1197
ino_to_fsba(fs, cg * fs->fs_ipg + cgp->cg_initediblk)),
sys/ufs/ffs/ffs_alloc.c
1198
(int)fs->fs_bsize, 0, INFSLP);
sys/ufs/ffs/ffs_alloc.c
1200
memset(ibp->b_data, 0, fs->fs_bsize);
sys/ufs/ffs/ffs_alloc.c
1204
for (i = 0; i < INOPB(fs); i++) {
sys/ufs/ffs/ffs_alloc.c
121
if (cred->cr_uid != 0 && freespace(fs, fs->fs_minfree) <= 0)
sys/ufs/ffs/ffs_alloc.c
1211
cgp->cg_initediblk += INOPB(fs);
sys/ufs/ffs/ffs_alloc.c
1219
fs->fs_cstotal.cs_nifree--;
sys/ufs/ffs/ffs_alloc.c
1220
fs->fs_cs(fs, cg).cs_nifree--;
sys/ufs/ffs/ffs_alloc.c
1221
fs->fs_fmod = 1; /* file system was modified */
sys/ufs/ffs/ffs_alloc.c
1226
fs->fs_cstotal.cs_ndir++;
sys/ufs/ffs/ffs_alloc.c
1227
fs->fs_cs(fs, cg).cs_ndir++;
sys/ufs/ffs/ffs_alloc.c
1238
return (cg * fs->fs_ipg + ipref);
sys/ufs/ffs/ffs_alloc.c
1251
struct fs *fs;
sys/ufs/ffs/ffs_alloc.c
1258
fs = ip->i_fs;
sys/ufs/ffs/ffs_alloc.c
1259
if ((u_int)size > fs->fs_bsize || fragoff(fs, size) != 0 ||
sys/ufs/ffs/ffs_alloc.c
1260
fragnum(fs, bno) + numfrags(fs, size) > fs->fs_frag) {
sys/ufs/ffs/ffs_alloc.c
1262
ip->i_dev, fs->fs_bsize, size, fs->fs_fsmnt);
sys/ufs/ffs/ffs_alloc.c
1265
cg = dtog(fs, bno);
sys/ufs/ffs/ffs_alloc.c
1266
if ((u_int)bno >= fs->fs_size) {
sys/ufs/ffs/ffs_alloc.c
1269
ffs_fserr(fs, DIP(ip, uid), "bad block");
sys/ufs/ffs/ffs_alloc.c
1272
if (!(bp = ffs_cgread(fs, ip, cg)))
sys/ufs/ffs/ffs_alloc.c
1280
bno = dtogd(fs, bno);
sys/ufs/ffs/ffs_alloc.c
1281
if (size == fs->fs_bsize) {
sys/ufs/ffs/ffs_alloc.c
1282
blkno = fragstoblks(fs, bno);
sys/ufs/ffs/ffs_alloc.c
1283
if (!ffs_isfreeblock(fs, cg_blksfree(cgp), blkno)) {
sys/ufs/ffs/ffs_alloc.c
1285
ip->i_dev, (long long)bno, fs->fs_fsmnt);
sys/ufs/ffs/ffs_alloc.c
1288
ffs_setblock(fs, cg_blksfree(cgp), blkno);
sys/ufs/ffs/ffs_alloc.c
1289
ffs_clusteracct(fs, cgp, blkno, 1);
sys/ufs/ffs/ffs_alloc.c
1291
fs->fs_cstotal.cs_nbfree++;
sys/ufs/ffs/ffs_alloc.c
1292
fs->fs_cs(fs, cg).cs_nbfree++;
sys/ufs/ffs/ffs_alloc.c
1294
if (fs->fs_magic != FS_UFS2_MAGIC) {
sys/ufs/ffs/ffs_alloc.c
1295
i = cbtocylno(fs, bno);
sys/ufs/ffs/ffs_alloc.c
1296
cg_blks(fs, cgp, i)[cbtorpos(fs, bno)]++;
sys/ufs/ffs/ffs_alloc.c
1301
bbase = bno - fragnum(fs, bno);
sys/ufs/ffs/ffs_alloc.c
1305
blk = blkmap(fs, cg_blksfree(cgp), bbase);
sys/ufs/ffs/ffs_alloc.c
1306
ffs_fragacct(fs, blk, cgp->cg_frsum, -1);
sys/ufs/ffs/ffs_alloc.c
1310
frags = numfrags(fs, size);
sys/ufs/ffs/ffs_alloc.c
1315
fs->fs_fsmnt);
sys/ufs/ffs/ffs_alloc.c
132
if (bpref >= fs->fs_size)
sys/ufs/ffs/ffs_alloc.c
1321
fs->fs_cstotal.cs_nffree += i;
sys/ufs/ffs/ffs_alloc.c
1322
fs->fs_cs(fs, cg).cs_nffree += i;
sys/ufs/ffs/ffs_alloc.c
1326
blk = blkmap(fs, cg_blksfree(cgp), bbase);
sys/ufs/ffs/ffs_alloc.c
1327
ffs_fragacct(fs, blk, cgp->cg_frsum, 1);
sys/ufs/ffs/ffs_alloc.c
1331
blkno = fragstoblks(fs, bbase);
sys/ufs/ffs/ffs_alloc.c
1332
if (ffs_isblock(fs, cg_blksfree(cgp), blkno)) {
sys/ufs/ffs/ffs_alloc.c
1333
cgp->cg_cs.cs_nffree -= fs->fs_frag;
sys/ufs/ffs/ffs_alloc.c
1334
fs->fs_cstotal.cs_nffree -= fs->fs_frag;
sys/ufs/ffs/ffs_alloc.c
1335
fs->fs_cs(fs, cg).cs_nffree -= fs->fs_frag;
sys/ufs/ffs/ffs_alloc.c
1336
ffs_clusteracct(fs, cgp, blkno, 1);
sys/ufs/ffs/ffs_alloc.c
1338
fs->fs_cstotal.cs_nbfree++;
sys/ufs/ffs/ffs_alloc.c
1339
fs->fs_cs(fs, cg).cs_nbfree++;
sys/ufs/ffs/ffs_alloc.c
1341
if (fs->fs_magic != FS_UFS2_MAGIC) {
sys/ufs/ffs/ffs_alloc.c
1342
i = cbtocylno(fs, bbase);
sys/ufs/ffs/ffs_alloc.c
1343
cg_blks(fs, cgp, i)[cbtorpos(fs, bbase)]++;
sys/ufs/ffs/ffs_alloc.c
1348
fs->fs_fmod = 1;
sys/ufs/ffs/ffs_alloc.c
135
cg = ino_to_cg(fs, ip->i_number);
sys/ufs/ffs/ffs_alloc.c
1365
struct fs *fs;
sys/ufs/ffs/ffs_alloc.c
137
cg = dtog(fs, bpref);
sys/ufs/ffs/ffs_alloc.c
1371
fs = pip->i_fs;
sys/ufs/ffs/ffs_alloc.c
1372
if (ino >= fs->fs_ipg * fs->fs_ncg)
sys/ufs/ffs/ffs_alloc.c
1374
pip->i_dev, ino, fs->fs_fsmnt);
sys/ufs/ffs/ffs_alloc.c
1376
cg = ino_to_cg(fs, ino);
sys/ufs/ffs/ffs_alloc.c
1377
if (!(bp = ffs_cgread(fs, pip, cg)))
sys/ufs/ffs/ffs_alloc.c
1385
ino %= fs->fs_ipg;
sys/ufs/ffs/ffs_alloc.c
1388
pip->i_dev, ino, fs->fs_fsmnt);
sys/ufs/ffs/ffs_alloc.c
1389
if (fs->fs_ronly == 0)
sys/ufs/ffs/ffs_alloc.c
1396
fs->fs_cstotal.cs_nifree++;
sys/ufs/ffs/ffs_alloc.c
1397
fs->fs_cs(fs, cg).cs_nifree++;
sys/ufs/ffs/ffs_alloc.c
1400
fs->fs_cstotal.cs_ndir--;
sys/ufs/ffs/ffs_alloc.c
1401
fs->fs_cs(fs, cg).cs_ndir--;
sys/ufs/ffs/ffs_alloc.c
1403
fs->fs_fmod = 1;
sys/ufs/ffs/ffs_alloc.c
1416
ffs_mapsearch(struct fs *fs, struct cg *cgp, daddr_t bpref, int allocsiz)
sys/ufs/ffs/ffs_alloc.c
1427
start = dtogd(fs, bpref) / NBBY;
sys/ufs/ffs/ffs_alloc.c
1430
len = howmany(fs->fs_fpg, NBBY) - start;
sys/ufs/ffs/ffs_alloc.c
1432
(u_char *)fragtbl[fs->fs_frag],
sys/ufs/ffs/ffs_alloc.c
1433
(u_char)(1 << (allocsiz - 1 + (fs->fs_frag % NBBY))));
sys/ufs/ffs/ffs_alloc.c
1438
(u_char *)fragtbl[fs->fs_frag],
sys/ufs/ffs/ffs_alloc.c
1439
(u_char)(1 << (allocsiz - 1 + (fs->fs_frag % NBBY))));
sys/ufs/ffs/ffs_alloc.c
1442
start, len, fs->fs_fsmnt);
sys/ufs/ffs/ffs_alloc.c
1453
for (i = bno + NBBY; bno < i; bno += fs->fs_frag) {
sys/ufs/ffs/ffs_alloc.c
1454
blk = blkmap(fs, cg_blksfree(cgp), bno);
sys/ufs/ffs/ffs_alloc.c
1458
for (pos = 0; pos <= fs->fs_frag - allocsiz; pos++) {
sys/ufs/ffs/ffs_alloc.c
1465
printf("bno = %lld, fs = %s\n", (long long)bno, fs->fs_fsmnt);
sys/ufs/ffs/ffs_alloc.c
1476
ffs_clusteracct(struct fs *fs, struct cg *cgp, daddr_t blkno, int cnt)
sys/ufs/ffs/ffs_alloc.c
1483
if (fs->fs_contigsumsize <= 0)
sys/ufs/ffs/ffs_alloc.c
1498
end = start + fs->fs_contigsumsize;
sys/ufs/ffs/ffs_alloc.c
1519
end = start - fs->fs_contigsumsize;
sys/ufs/ffs/ffs_alloc.c
154
ffs_fserr(fs, cred->cr_uid, "file system full");
sys/ufs/ffs/ffs_alloc.c
1541
if (i > fs->fs_contigsumsize)
sys/ufs/ffs/ffs_alloc.c
1542
i = fs->fs_contigsumsize;
sys/ufs/ffs/ffs_alloc.c
1551
lp = &sump[fs->fs_contigsumsize];
sys/ufs/ffs/ffs_alloc.c
1552
for (i = fs->fs_contigsumsize; i > 0; i--)
sys/ufs/ffs/ffs_alloc.c
1555
fs->fs_maxcluster[cgp->cg_cgx] = i;
sys/ufs/ffs/ffs_alloc.c
156
fs->fs_fsmnt);
sys/ufs/ffs/ffs_alloc.c
174
struct fs *fs;
sys/ufs/ffs/ffs_alloc.c
183
fs = ip->i_fs;
sys/ufs/ffs/ffs_alloc.c
185
if ((u_int)osize > fs->fs_bsize || fragoff(fs, osize) != 0 ||
sys/ufs/ffs/ffs_alloc.c
186
(u_int)nsize > fs->fs_bsize || fragoff(fs, nsize) != 0) {
sys/ufs/ffs/ffs_alloc.c
189
ip->i_dev, fs->fs_bsize, osize, nsize, fs->fs_fsmnt);
sys/ufs/ffs/ffs_alloc.c
195
if (cred->cr_uid != 0 && freespace(fs, fs->fs_minfree) <= 0)
sys/ufs/ffs/ffs_alloc.c
202
ip->i_dev, fs->fs_bsize, (long long)bprev, fs->fs_fsmnt);
sys/ufs/ffs/ffs_alloc.c
210
if ((error = bread(ITOV(ip), lbprev, fs->fs_bsize, &bp)) != 0)
sys/ufs/ffs/ffs_alloc.c
224
cg = dtog(fs, bprev);
sys/ufs/ffs/ffs_alloc.c
229
if (bp->b_blkno != fsbtodb(fs, bno))
sys/ufs/ffs/ffs_alloc.c
248
if (bpref >= fs->fs_size)
sys/ufs/ffs/ffs_alloc.c
250
switch (fs->fs_optim) {
sys/ufs/ffs/ffs_alloc.c
260
if (fs->fs_minfree < 5 ||
sys/ufs/ffs/ffs_alloc.c
261
fs->fs_cstotal.cs_nffree >
sys/ufs/ffs/ffs_alloc.c
262
fs->fs_dsize * fs->fs_minfree / (2 * 100))
sys/ufs/ffs/ffs_alloc.c
264
fs->fs_optim = FS_OPTTIME;
sys/ufs/ffs/ffs_alloc.c
277
request = fs->fs_bsize;
sys/ufs/ffs/ffs_alloc.c
278
if (fs->fs_cstotal.cs_nffree <
sys/ufs/ffs/ffs_alloc.c
279
fs->fs_dsize * (fs->fs_minfree - 2) / 100)
sys/ufs/ffs/ffs_alloc.c
281
fs->fs_optim = FS_OPTSPACE;
sys/ufs/ffs/ffs_alloc.c
285
ip->i_dev, fs->fs_optim, fs->fs_fsmnt);
sys/ufs/ffs/ffs_alloc.c
296
ffs_blkfree(ip, bno + numfrags(fs, nsize),
sys/ufs/ffs/ffs_alloc.c
301
bp->b_blkno = fsbtodb(fs, bno);
sys/ufs/ffs/ffs_alloc.c
318
ffs_fserr(fs, cred->cr_uid, "file system full");
sys/ufs/ffs/ffs_alloc.c
320
fs->fs_fsmnt);
sys/ufs/ffs/ffs_alloc.c
360
struct fs *fs;
sys/ufs/ffs/ffs_alloc.c
367
fs = pip->i_fs;
sys/ufs/ffs/ffs_alloc.c
368
if (fs->fs_cstotal.cs_nifree == 0)
sys/ufs/ffs/ffs_alloc.c
375
if (ipref >= fs->fs_ncg * fs->fs_ipg)
sys/ufs/ffs/ffs_alloc.c
377
cg = ino_to_cg(fs, ipref);
sys/ufs/ffs/ffs_alloc.c
384
if (fs->fs_contigdirs[cg] < 255)
sys/ufs/ffs/ffs_alloc.c
385
fs->fs_contigdirs[cg]++;
sys/ufs/ffs/ffs_alloc.c
387
if (fs->fs_contigdirs[cg] > 0)
sys/ufs/ffs/ffs_alloc.c
388
fs->fs_contigdirs[cg]--;
sys/ufs/ffs/ffs_alloc.c
403
DIP(ip, mode), ip->i_number, fs->fs_fsmnt);
sys/ufs/ffs/ffs_alloc.c
409
fs->fs_fsmnt, ino, (long long)DIP(ip, blocks));
sys/ufs/ffs/ffs_alloc.c
429
ffs_fserr(fs, cred->cr_uid, "out of inodes");
sys/ufs/ffs/ffs_alloc.c
431
fs->fs_fsmnt);
sys/ufs/ffs/ffs_alloc.c
452
struct fs *fs;
sys/ufs/ffs/ffs_alloc.c
460
fs = pip->i_fs;
sys/ufs/ffs/ffs_alloc.c
462
avgifree = fs->fs_cstotal.cs_nifree / fs->fs_ncg;
sys/ufs/ffs/ffs_alloc.c
463
avgbfree = fs->fs_cstotal.cs_nbfree / fs->fs_ncg;
sys/ufs/ffs/ffs_alloc.c
464
avgndir = fs->fs_cstotal.cs_ndir / fs->fs_ncg;
sys/ufs/ffs/ffs_alloc.c
470
prefcg = arc4random_uniform(fs->fs_ncg);
sys/ufs/ffs/ffs_alloc.c
472
minndir = fs->fs_ipg;
sys/ufs/ffs/ffs_alloc.c
473
for (cg = prefcg; cg < fs->fs_ncg; cg++)
sys/ufs/ffs/ffs_alloc.c
474
if (fs->fs_cs(fs, cg).cs_ndir < minndir &&
sys/ufs/ffs/ffs_alloc.c
475
fs->fs_cs(fs, cg).cs_nifree >= avgifree &&
sys/ufs/ffs/ffs_alloc.c
476
fs->fs_cs(fs, cg).cs_nbfree >= avgbfree) {
sys/ufs/ffs/ffs_alloc.c
478
minndir = fs->fs_cs(fs, cg).cs_ndir;
sys/ufs/ffs/ffs_alloc.c
481
if (fs->fs_cs(fs, cg).cs_ndir < minndir &&
sys/ufs/ffs/ffs_alloc.c
482
fs->fs_cs(fs, cg).cs_nifree >= avgifree &&
sys/ufs/ffs/ffs_alloc.c
483
fs->fs_cs(fs, cg).cs_nbfree >= avgbfree) {
sys/ufs/ffs/ffs_alloc.c
485
minndir = fs->fs_cs(fs, cg).cs_ndir;
sys/ufs/ffs/ffs_alloc.c
490
prefcg = ino_to_cg(fs, pip->i_number);
sys/ufs/ffs/ffs_alloc.c
496
maxndir = min(avgndir + fs->fs_ipg / 16, fs->fs_ipg);
sys/ufs/ffs/ffs_alloc.c
504
cgsize = fs->fs_fsize * fs->fs_fpg;
sys/ufs/ffs/ffs_alloc.c
505
dirsize = fs->fs_avgfilesize * fs->fs_avgfpdir;
sys/ufs/ffs/ffs_alloc.c
506
curdirsize = avgndir ? (cgsize - avgbfree * fs->fs_bsize) / avgndir : 0;
sys/ufs/ffs/ffs_alloc.c
512
maxcontigdirs = min(avgbfree * fs->fs_bsize / dirsize, 255);
sys/ufs/ffs/ffs_alloc.c
513
if (fs->fs_avgfpdir > 0)
sys/ufs/ffs/ffs_alloc.c
515
fs->fs_ipg / fs->fs_avgfpdir);
sys/ufs/ffs/ffs_alloc.c
541
for (cg = prefcg; cg < fs->fs_ncg; cg++)
sys/ufs/ffs/ffs_alloc.c
542
if (fs->fs_cs(fs, cg).cs_ndir < maxndir &&
sys/ufs/ffs/ffs_alloc.c
543
fs->fs_cs(fs, cg).cs_nifree >= minifree &&
sys/ufs/ffs/ffs_alloc.c
544
fs->fs_cs(fs, cg).cs_nbfree >= minbfree) {
sys/ufs/ffs/ffs_alloc.c
545
if (fs->fs_contigdirs[cg] < maxcontigdirs)
sys/ufs/ffs/ffs_alloc.c
549
if (fs->fs_cs(fs, cg).cs_ndir < maxndir &&
sys/ufs/ffs/ffs_alloc.c
550
fs->fs_cs(fs, cg).cs_nifree >= minifree &&
sys/ufs/ffs/ffs_alloc.c
551
fs->fs_cs(fs, cg).cs_nbfree >= minbfree) {
sys/ufs/ffs/ffs_alloc.c
552
if (fs->fs_contigdirs[cg] < maxcontigdirs)
sys/ufs/ffs/ffs_alloc.c
558
for (cg = prefcg; cg < fs->fs_ncg; cg++)
sys/ufs/ffs/ffs_alloc.c
559
if (fs->fs_cs(fs, cg).cs_nifree >= avgifree)
sys/ufs/ffs/ffs_alloc.c
562
if (fs->fs_cs(fs, cg).cs_nifree >= avgifree)
sys/ufs/ffs/ffs_alloc.c
565
return ((ufsino_t)(fs->fs_ipg * cg));
sys/ufs/ffs/ffs_alloc.c
596
struct fs *fs;
sys/ufs/ffs/ffs_alloc.c
602
fs = ip->i_fs;
sys/ufs/ffs/ffs_alloc.c
61
#define ffs_fserr(fs, uid, cp) do { \
sys/ufs/ffs/ffs_alloc.c
614
inocg = ino_to_cg(fs, ip->i_number);
sys/ufs/ffs/ffs_alloc.c
621
pref = cgmeta(fs, inocg);
sys/ufs/ffs/ffs_alloc.c
626
if (indx == -1 && lbn < NDADDR + NINDIR(fs) &&
sys/ufs/ffs/ffs_alloc.c
628
pref = ip->i_din1->di_db[NDADDR - 1] + fs->fs_frag;
sys/ufs/ffs/ffs_alloc.c
63
(fs)->fs_fsmnt, (cp)); \
sys/ufs/ffs/ffs_alloc.c
638
if (pref != 0 && pref >= cgdata(fs, inocg) &&
sys/ufs/ffs/ffs_alloc.c
639
pref < cgbase(fs, inocg + 1))
sys/ufs/ffs/ffs_alloc.c
640
return (pref + fs->fs_frag);
sys/ufs/ffs/ffs_alloc.c
648
if (indx % fs->fs_maxbpg == 0 || bap[indx - 1] == 0) {
sys/ufs/ffs/ffs_alloc.c
654
return (cgmeta(fs, inocg));
sys/ufs/ffs/ffs_alloc.c
660
if (lbn < NDADDR + NINDIR(fs))
sys/ufs/ffs/ffs_alloc.c
661
return (cgdata(fs, inocg));
sys/ufs/ffs/ffs_alloc.c
667
startcg = inocg + lbn / fs->fs_maxbpg;
sys/ufs/ffs/ffs_alloc.c
669
startcg = dtog(fs, bap[indx - 1]) + 1;
sys/ufs/ffs/ffs_alloc.c
67
struct buf * ffs_cgread(struct fs *, struct inode *, u_int);
sys/ufs/ffs/ffs_alloc.c
670
startcg %= fs->fs_ncg;
sys/ufs/ffs/ffs_alloc.c
671
avgbfree = fs->fs_cstotal.cs_nbfree / fs->fs_ncg;
sys/ufs/ffs/ffs_alloc.c
672
for (cg = startcg; cg < fs->fs_ncg; cg++)
sys/ufs/ffs/ffs_alloc.c
673
if (fs->fs_cs(fs, cg).cs_nbfree >= avgbfree) {
sys/ufs/ffs/ffs_alloc.c
674
fs->fs_cgrotor = cg;
sys/ufs/ffs/ffs_alloc.c
675
return (cgdata(fs, cg));
sys/ufs/ffs/ffs_alloc.c
678
if (fs->fs_cs(fs, cg).cs_nbfree >= avgbfree) {
sys/ufs/ffs/ffs_alloc.c
679
fs->fs_cgrotor = cg;
sys/ufs/ffs/ffs_alloc.c
680
return (cgdata(fs, cg));
sys/ufs/ffs/ffs_alloc.c
687
return (bap[indx - 1] + fs->fs_frag);
sys/ufs/ffs/ffs_alloc.c
697
struct fs *fs;
sys/ufs/ffs/ffs_alloc.c
703
fs = ip->i_fs;
sys/ufs/ffs/ffs_alloc.c
715
inocg = ino_to_cg(fs, ip->i_number);
sys/ufs/ffs/ffs_alloc.c
722
pref = cgmeta(fs, inocg);
sys/ufs/ffs/ffs_alloc.c
727
if (indx == -1 && lbn < NDADDR + NINDIR(fs) &&
sys/ufs/ffs/ffs_alloc.c
729
pref = ip->i_din2->di_db[NDADDR - 1] + fs->fs_frag;
sys/ufs/ffs/ffs_alloc.c
739
if (pref != 0 && pref >= cgdata(fs, inocg) &&
sys/ufs/ffs/ffs_alloc.c
74
daddr_t ffs_mapsearch(struct fs *, struct cg *, daddr_t, int);
sys/ufs/ffs/ffs_alloc.c
740
pref < cgbase(fs, inocg + 1))
sys/ufs/ffs/ffs_alloc.c
741
return (pref + fs->fs_frag);
sys/ufs/ffs/ffs_alloc.c
750
if (indx % fs->fs_maxbpg == 0 || bap[indx - 1] == 0) {
sys/ufs/ffs/ffs_alloc.c
756
return (cgmeta(fs, inocg));
sys/ufs/ffs/ffs_alloc.c
762
if (lbn < NDADDR + NINDIR(fs))
sys/ufs/ffs/ffs_alloc.c
763
return (cgdata(fs, inocg));
sys/ufs/ffs/ffs_alloc.c
769
startcg = inocg + lbn / fs->fs_maxbpg;
sys/ufs/ffs/ffs_alloc.c
771
startcg = dtog(fs, bap[indx - 1] + 1);
sys/ufs/ffs/ffs_alloc.c
773
startcg %= fs->fs_ncg;
sys/ufs/ffs/ffs_alloc.c
774
avgbfree = fs->fs_cstotal.cs_nbfree / fs->fs_ncg;
sys/ufs/ffs/ffs_alloc.c
776
for (cg = startcg; cg < fs->fs_ncg; cg++)
sys/ufs/ffs/ffs_alloc.c
777
if (fs->fs_cs(fs, cg).cs_nbfree >= avgbfree)
sys/ufs/ffs/ffs_alloc.c
778
return (cgbase(fs, cg) + fs->fs_frag);
sys/ufs/ffs/ffs_alloc.c
781
if (fs->fs_cs(fs, cg).cs_nbfree >= avgbfree)
sys/ufs/ffs/ffs_alloc.c
782
return (cgbase(fs, cg) + fs->fs_frag);
sys/ufs/ffs/ffs_alloc.c
790
return (bap[indx - 1] + fs->fs_frag);
sys/ufs/ffs/ffs_alloc.c
806
struct fs *fs;
sys/ufs/ffs/ffs_alloc.c
810
fs = ip->i_fs;
sys/ufs/ffs/ffs_alloc.c
820
for (i = 1; i < fs->fs_ncg; i *= 2) {
sys/ufs/ffs/ffs_alloc.c
822
if (cg >= fs->fs_ncg)
sys/ufs/ffs/ffs_alloc.c
823
cg -= fs->fs_ncg;
sys/ufs/ffs/ffs_alloc.c
833
cg = (icg + 2) % fs->fs_ncg;
sys/ufs/ffs/ffs_alloc.c
834
for (i = 2; i < fs->fs_ncg; i++) {
sys/ufs/ffs/ffs_alloc.c
839
if (cg == fs->fs_ncg)
sys/ufs/ffs/ffs_alloc.c
846
ffs_cgread(struct fs *fs, struct inode *ip, u_int cg)
sys/ufs/ffs/ffs_alloc.c
850
if (bread(ip->i_devvp, fsbtodb(fs, cgtod(fs, cg)),
sys/ufs/ffs/ffs_alloc.c
851
(int)fs->fs_cgsize, &bp)) {
sys/ufs/ffs/ffs_alloc.c
873
struct fs *fs;
sys/ufs/ffs/ffs_alloc.c
880
fs = ip->i_fs;
sys/ufs/ffs/ffs_alloc.c
881
if (fs->fs_cs(fs, cg).cs_nffree < numfrags(fs, nsize - osize))
sys/ufs/ffs/ffs_alloc.c
883
frags = numfrags(fs, nsize);
sys/ufs/ffs/ffs_alloc.c
884
bbase = fragnum(fs, bprev);
sys/ufs/ffs/ffs_alloc.c
885
if (bbase > fragnum(fs, (bprev + frags - 1))) {
sys/ufs/ffs/ffs_alloc.c
890
if (!(bp = ffs_cgread(fs, ip, cg)))
sys/ufs/ffs/ffs_alloc.c
898
bno = dtogd(fs, bprev);
sys/ufs/ffs/ffs_alloc.c
899
for (i = numfrags(fs, osize); i < frags; i++)
sys/ufs/ffs/ffs_alloc.c
910
for (i = frags; i < fs->fs_frag - bbase; i++)
sys/ufs/ffs/ffs_alloc.c
913
cgp->cg_frsum[i - numfrags(fs, osize)]--;
sys/ufs/ffs/ffs_alloc.c
916
for (i = numfrags(fs, osize); i < frags; i++) {
sys/ufs/ffs/ffs_alloc.c
919
fs->fs_cstotal.cs_nffree--;
sys/ufs/ffs/ffs_alloc.c
920
fs->fs_cs(fs, cg).cs_nffree--;
sys/ufs/ffs/ffs_alloc.c
922
fs->fs_fmod = 1;
sys/ufs/ffs/ffs_alloc.c
937
struct fs *fs;
sys/ufs/ffs/ffs_alloc.c
944
fs = ip->i_fs;
sys/ufs/ffs/ffs_alloc.c
945
if (fs->fs_cs(fs, cg).cs_nbfree == 0 && size == fs->fs_bsize)
sys/ufs/ffs/ffs_alloc.c
948
if (!(bp = ffs_cgread(fs, ip, cg)))
sys/ufs/ffs/ffs_alloc.c
952
if (cgp->cg_cs.cs_nbfree == 0 && size == fs->fs_bsize) {
sys/ufs/ffs/ffs_alloc.c
961
if (size == fs->fs_bsize) {
sys/ufs/ffs/ffs_alloc.c
972
frags = numfrags(fs, size);
sys/ufs/ffs/ffs_alloc.c
973
for (allocsiz = frags; allocsiz < fs->fs_frag; allocsiz++)
sys/ufs/ffs/ffs_alloc.c
976
if (allocsiz == fs->fs_frag) {
sys/ufs/ffs/ffs_alloc.c
986
bpref = dtogd(fs, bno);
sys/ufs/ffs/ffs_alloc.c
987
for (i = frags; i < fs->fs_frag; i++)
sys/ufs/ffs/ffs_alloc.c
989
i = fs->fs_frag - frags;
sys/ufs/ffs/ffs_alloc.c
991
fs->fs_cstotal.cs_nffree += i;
sys/ufs/ffs/ffs_alloc.c
992
fs->fs_cs(fs, cg).cs_nffree += i;
sys/ufs/ffs/ffs_alloc.c
993
fs->fs_fmod = 1;
sys/ufs/ffs/ffs_alloc.c
998
bno = ffs_mapsearch(fs, cgp, bpref, allocsiz);
sys/ufs/ffs/ffs_balloc.c
101
nb = lblkno(fs, ip->i_ffs1_size);
sys/ufs/ffs/ffs_balloc.c
103
osize = blksize(fs, ip, nb);
sys/ufs/ffs/ffs_balloc.c
104
if (osize < fs->fs_bsize && osize > 0) {
sys/ufs/ffs/ffs_balloc.c
107
osize, (int)fs->fs_bsize, cred, bpp, &newb);
sys/ufs/ffs/ffs_balloc.c
111
ip->i_ffs1_size = lblktosize(fs, nb + 1);
sys/ufs/ffs/ffs_balloc.c
128
if (nb != 0 && ip->i_ffs1_size >= lblktosize(fs, lbn + 1)) {
sys/ufs/ffs/ffs_balloc.c
137
error = bread(vp, lbn, fs->fs_bsize, bpp);
sys/ufs/ffs/ffs_balloc.c
149
osize = fragroundup(fs, blkoff(fs, ip->i_ffs1_size));
sys/ufs/ffs/ffs_balloc.c
150
nsize = fragroundup(fs, size);
sys/ufs/ffs/ffs_balloc.c
158
error = bread(vp, lbn, fs->fs_bsize,
sys/ufs/ffs/ffs_balloc.c
185
if (ip->i_ffs1_size < lblktosize(fs, lbn + 1))
sys/ufs/ffs/ffs_balloc.c
186
nsize = fragroundup(fs, size);
sys/ufs/ffs/ffs_balloc.c
188
nsize = fs->fs_bsize;
sys/ufs/ffs/ffs_balloc.c
195
*bpp = getblk(vp, lbn, fs->fs_bsize, 0, INFSLP);
sys/ufs/ffs/ffs_balloc.c
196
if (nsize < fs->fs_bsize)
sys/ufs/ffs/ffs_balloc.c
198
(*bpp)->b_blkno = fsbtodb(fs, newb);
sys/ufs/ffs/ffs_balloc.c
228
error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize,
sys/ufs/ffs/ffs_balloc.c
235
bp = getblk(vp, indirs[1].in_lbn, fs->fs_bsize, 0, INFSLP);
sys/ufs/ffs/ffs_balloc.c
236
bp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ffs/ffs_balloc.c
254
error = bread(vp, indirs[i].in_lbn, (int)fs->fs_bsize, &bp);
sys/ufs/ffs/ffs_balloc.c
270
error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, cred,
sys/ufs/ffs/ffs_balloc.c
278
nbp = getblk(vp, indirs[i].in_lbn, fs->fs_bsize, 0, INFSLP);
sys/ufs/ffs/ffs_balloc.c
279
nbp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ffs/ffs_balloc.c
308
error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, cred,
sys/ufs/ffs/ffs_balloc.c
317
nbp = getblk(vp, lbn, fs->fs_bsize, 0, INFSLP);
sys/ufs/ffs/ffs_balloc.c
318
nbp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ffs/ffs_balloc.c
338
error = bread(vp, lbn, (int)fs->fs_bsize, &nbp);
sys/ufs/ffs/ffs_balloc.c
344
nbp = getblk(vp, lbn, fs->fs_bsize, 0, INFSLP);
sys/ufs/ffs/ffs_balloc.c
345
nbp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ffs/ffs_balloc.c
370
ffs_blkfree(ip, *blkp, fs->fs_bsize);
sys/ufs/ffs/ffs_balloc.c
371
deallocated += fs->fs_bsize;
sys/ufs/ffs/ffs_balloc.c
378
r = bread(vp, indirs[unwindidx].in_lbn, (int)fs->fs_bsize, &bp);
sys/ufs/ffs/ffs_balloc.c
413
struct fs *fs;
sys/ufs/ffs/ffs_balloc.c
418
fs = ip->i_fs;
sys/ufs/ffs/ffs_balloc.c
422
lbn = lblkno(fs, off);
sys/ufs/ffs/ffs_balloc.c
423
size = blkoff(fs, off) + size;
sys/ufs/ffs/ffs_balloc.c
425
if (size > fs->fs_bsize)
sys/ufs/ffs/ffs_balloc.c
439
lastlbn = lblkno(fs, ip->i_ffs2_size);
sys/ufs/ffs/ffs_balloc.c
442
osize = blksize(fs, ip, nb);
sys/ufs/ffs/ffs_balloc.c
443
if (osize < fs->fs_bsize && osize > 0) {
sys/ufs/ffs/ffs_balloc.c
446
(int) fs->fs_bsize, cred, bpp, &newb);
sys/ufs/ffs/ffs_balloc.c
450
ip->i_ffs2_size = lblktosize(fs, nb + 1);
sys/ufs/ffs/ffs_balloc.c
471
if (nb != 0 && ip->i_ffs2_size >= lblktosize(fs, lbn + 1)) {
sys/ufs/ffs/ffs_balloc.c
478
error = bread(vp, lbn, fs->fs_bsize, bpp);
sys/ufs/ffs/ffs_balloc.c
492
osize = fragroundup(fs, blkoff(fs, ip->i_ffs2_size));
sys/ufs/ffs/ffs_balloc.c
493
nsize = fragroundup(fs, size);
sys/ufs/ffs/ffs_balloc.c
501
error = bread(vp, lbn, fs->fs_bsize,
sys/ufs/ffs/ffs_balloc.c
528
if (ip->i_ffs2_size < lblktosize(fs, lbn + 1))
sys/ufs/ffs/ffs_balloc.c
529
nsize = fragroundup(fs, size);
sys/ufs/ffs/ffs_balloc.c
531
nsize = fs->fs_bsize;
sys/ufs/ffs/ffs_balloc.c
539
bp = getblk(vp, lbn, fs->fs_bsize, 0, INFSLP);
sys/ufs/ffs/ffs_balloc.c
540
if (nsize < fs->fs_bsize)
sys/ufs/ffs/ffs_balloc.c
542
bp->b_blkno = fsbtodb(fs, newb);
sys/ufs/ffs/ffs_balloc.c
578
error = ffs_alloc(ip, lbn, pref, (int) fs->fs_bsize, cred,
sys/ufs/ffs/ffs_balloc.c
585
bp = getblk(vp, indirs[1].in_lbn, fs->fs_bsize, 0, INFSLP);
sys/ufs/ffs/ffs_balloc.c
586
bp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ffs/ffs_balloc.c
607
error = bread(vp, indirs[i].in_lbn, (int)fs->fs_bsize, &bp);
sys/ufs/ffs/ffs_balloc.c
629
error = ffs_alloc(ip, lbn, pref, (int) fs->fs_bsize, cred,
sys/ufs/ffs/ffs_balloc.c
638
nbp = getblk(vp, indirs[i].in_lbn, fs->fs_bsize, 0, INFSLP);
sys/ufs/ffs/ffs_balloc.c
639
nbp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ffs/ffs_balloc.c
673
error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, cred,
sys/ufs/ffs/ffs_balloc.c
684
nbp = getblk(vp, lbn, fs->fs_bsize, 0, INFSLP);
sys/ufs/ffs/ffs_balloc.c
685
nbp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ffs/ffs_balloc.c
712
error = bread(vp, lbn, (int)fs->fs_bsize, &nbp);
sys/ufs/ffs/ffs_balloc.c
718
nbp = getblk(vp, lbn, fs->fs_bsize, 0, INFSLP);
sys/ufs/ffs/ffs_balloc.c
719
nbp->b_blkno = fsbtodb(fs, nb);
sys/ufs/ffs/ffs_balloc.c
74
struct fs *fs;
sys/ufs/ffs/ffs_balloc.c
757
bp = getblk(vp, indirs[i].in_lbn, (int) fs->fs_bsize,
sys/ufs/ffs/ffs_balloc.c
760
nb = fsbtodb(fs, cgtod(fs, dtog(fs,
sys/ufs/ffs/ffs_balloc.c
761
dbtofsb(fs, bp->b_blkno))));
sys/ufs/ffs/ffs_balloc.c
764
(int) fs->fs_cgsize, 0, INFSLP);
sys/ufs/ffs/ffs_balloc.c
786
(int)fs->fs_bsize, &bp);
sys/ufs/ffs/ffs_balloc.c
796
bp = getblk(vp, indirs[i].in_lbn, (int)fs->fs_bsize, 0,
sys/ufs/ffs/ffs_balloc.c
804
ffs_blkfree(ip, *blkp, fs->fs_bsize);
sys/ufs/ffs/ffs_balloc.c
805
deallocated += fs->fs_bsize;
sys/ufs/ffs/ffs_balloc.c
85
fs = ip->i_fs;
sys/ufs/ffs/ffs_balloc.c
87
lbn = lblkno(fs, startoffset);
sys/ufs/ffs/ffs_balloc.c
88
size = blkoff(fs, startoffset) + size;
sys/ufs/ffs/ffs_balloc.c
89
if (size > fs->fs_bsize)
sys/ufs/ffs/ffs_extern.h
115
void ffs_clusteracct(struct fs *, struct cg *, daddr_t, int);
sys/ufs/ffs/ffs_extern.h
127
void ffs_fragacct(struct fs *, int, int32_t[], int);
sys/ufs/ffs/ffs_extern.h
128
int ffs_isfreeblock(struct fs *, u_char *, daddr_t);
sys/ufs/ffs/ffs_extern.h
129
int ffs_isblock(struct fs *, u_char *, daddr_t);
sys/ufs/ffs/ffs_extern.h
130
void ffs_clrblock(struct fs *, u_char *, daddr_t);
sys/ufs/ffs/ffs_extern.h
131
void ffs_setblock(struct fs *, u_char *, daddr_t);
sys/ufs/ffs/ffs_extern.h
140
int ffs_oldfscompat(struct fs *);
sys/ufs/ffs/ffs_extern.h
81
struct fs;
sys/ufs/ffs/ffs_inode.c
104
ino_to_fsbo(fs, ip->i_number)) = *ip->i_din2;
sys/ufs/ffs/ffs_inode.c
108
ino_to_fsbo(fs, ip->i_number)) = *ip->i_din1;
sys/ufs/ffs/ffs_inode.c
133
struct fs *fs;
sys/ufs/ffs/ffs_inode.c
167
fs = oip->i_fs;
sys/ufs/ffs/ffs_inode.c
168
if (length > fs->fs_maxfilesize)
sys/ufs/ffs/ffs_inode.c
209
offset = blkoff(fs, length);
sys/ufs/ffs/ffs_inode.c
213
lbn = lblkno(fs, length);
sys/ufs/ffs/ffs_inode.c
222
size = blksize(fs, oip, lbn);
sys/ufs/ffs/ffs_inode.c
238
lastblock = lblkno(fs, length + fs->fs_bsize - 1) - 1;
sys/ufs/ffs/ffs_inode.c
240
lastiblock[DOUBLE] = lastiblock[SINGLE] - NINDIR(fs);
sys/ufs/ffs/ffs_inode.c
241
lastiblock[TRIPLE] = lastiblock[DOUBLE] - NINDIR(fs) * NINDIR(fs);
sys/ufs/ffs/ffs_inode.c
242
nblocks = btodb(fs->fs_bsize);
sys/ufs/ffs/ffs_inode.c
292
indir_lbn[DOUBLE] = indir_lbn[SINGLE] - NINDIR(fs) - 1;
sys/ufs/ffs/ffs_inode.c
293
indir_lbn[TRIPLE] = indir_lbn[DOUBLE] - NINDIR(fs) * NINDIR(fs) - 1;
sys/ufs/ffs/ffs_inode.c
298
fsbtodb(fs, bn), lastiblock[level], level, &count);
sys/ufs/ffs/ffs_inode.c
304
ffs_blkfree(oip, bn, fs->fs_bsize);
sys/ufs/ffs/ffs_inode.c
323
bsize = blksize(fs, oip, i);
sys/ufs/ffs/ffs_inode.c
342
oldspace = blksize(fs, oip, lastblock);
sys/ufs/ffs/ffs_inode.c
344
newspace = blksize(fs, oip, lastblock);
sys/ufs/ffs/ffs_inode.c
353
bn += numfrags(fs, newspace);
sys/ufs/ffs/ffs_inode.c
409
struct fs *fs = ip->i_fs;
sys/ufs/ffs/ffs_inode.c
428
factor *= NINDIR(fs);
sys/ufs/ffs/ffs_inode.c
432
nblocks = btodb(fs->fs_bsize);
sys/ufs/ffs/ffs_inode.c
442
bp = getblk(vp, lbn, (int)fs->fs_bsize, 0, INFSLP);
sys/ufs/ffs/ffs_inode.c
468
copy = malloc(fs->fs_bsize, M_TEMP, M_WAITOK);
sys/ufs/ffs/ffs_inode.c
469
memcpy(copy, bp->b_data, fs->fs_bsize);
sys/ufs/ffs/ffs_inode.c
471
for (i = last + 1; i < NINDIR(fs); i++)
sys/ufs/ffs/ffs_inode.c
493
for (i = NINDIR(fs) - 1, nlbn = lbn + 1 - i * factor; i > last;
sys/ufs/ffs/ffs_inode.c
499
error = ffs_indirtrunc(ip, nlbn, fsbtodb(fs, nb),
sys/ufs/ffs/ffs_inode.c
505
ffs_blkfree(ip, nb, fs->fs_bsize);
sys/ufs/ffs/ffs_inode.c
516
error = ffs_indirtrunc(ip, nlbn, fsbtodb(fs, nb),
sys/ufs/ffs/ffs_inode.c
524
free(copy, M_TEMP, fs->fs_bsize);
sys/ufs/ffs/ffs_inode.c
69
struct fs *fs;
sys/ufs/ffs/ffs_inode.c
80
fs = ip->i_fs;
sys/ufs/ffs/ffs_inode.c
86
if (fs->fs_magic == FS_UFS1_MAGIC && fs->fs_inodefmt < FS_44INODEFMT) {
sys/ufs/ffs/ffs_inode.c
91
error = bread(ip->i_devvp, fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
sys/ufs/ffs/ffs_inode.c
92
(int)fs->fs_bsize, &bp);
sys/ufs/ffs/ffs_subr.c
102
inblk = (int)(fragtbl[fs->fs_frag][fragmap]) << 1;
sys/ufs/ffs/ffs_subr.c
104
for (siz = 1; siz < fs->fs_frag; siz++) {
sys/ufs/ffs/ffs_subr.c
105
if ((inblk & (1 << (siz + (fs->fs_frag % NBBY)))) == 0)
sys/ufs/ffs/ffs_subr.c
109
for (pos = siz; pos <= fs->fs_frag; pos++) {
sys/ufs/ffs/ffs_subr.c
128
ffs_isblock(struct fs *fs, u_char *cp, daddr_t h)
sys/ufs/ffs/ffs_subr.c
132
switch (fs->fs_frag) {
sys/ufs/ffs/ffs_subr.c
152
ffs_clrblock(struct fs *fs, u_char *cp, daddr_t h)
sys/ufs/ffs/ffs_subr.c
155
switch (fs->fs_frag) {
sys/ufs/ffs/ffs_subr.c
176
ffs_setblock(struct fs *fs, u_char *cp, daddr_t h)
sys/ufs/ffs/ffs_subr.c
179
switch (fs->fs_frag) {
sys/ufs/ffs/ffs_subr.c
200
ffs_isfreeblock(struct fs *fs, u_char *cp, daddr_t h)
sys/ufs/ffs/ffs_subr.c
203
switch (fs->fs_frag) {
sys/ufs/ffs/ffs_subr.c
59
struct fs *fs;
sys/ufs/ffs/ffs_subr.c
66
fs = ip->i_fs;
sys/ufs/ffs/ffs_subr.c
67
lbn = lblkno(fs, offset);
sys/ufs/ffs/ffs_subr.c
68
bsize = blksize(fs, ip, lbn);
sys/ufs/ffs/ffs_subr.c
71
if ((error = bread(vp, lbn, fs->fs_bsize, &bp)) != 0) {
sys/ufs/ffs/ffs_subr.c
77
*res = (char *)bp->b_data + blkoff(fs, offset);
sys/ufs/ffs/ffs_subr.c
83
void ffs_fragacct(struct fs *, int, int32_t[], int);
sys/ufs/ffs/ffs_subr.c
84
int ffs_isfreeblock(struct fs *, u_char *, daddr_t);
sys/ufs/ffs/ffs_subr.c
85
int ffs_isblock(struct fs *, u_char *, daddr_t);
sys/ufs/ffs/ffs_subr.c
86
void ffs_clrblock(struct fs *, u_char *, daddr_t);
sys/ufs/ffs/ffs_subr.c
87
void ffs_setblock(struct fs *, u_char *, daddr_t);
sys/ufs/ffs/ffs_subr.c
96
ffs_fragacct(struct fs *fs, int fragmap, int32_t fraglist[], int cnt)
sys/ufs/ffs/ffs_vfsops.c
1005
struct fs *fs;
sys/ufs/ffs/ffs_vfsops.c
1008
fs = ump->um_fs;
sys/ufs/ffs/ffs_vfsops.c
1011
if (fs->fs_magic != FS_MAGIC && fs->fs_magic != FS_UFS2_MAGIC)
sys/ufs/ffs/ffs_vfsops.c
1014
if (fs->fs_magic != FS_MAGIC)
sys/ufs/ffs/ffs_vfsops.c
1018
sbp->f_bsize = fs->fs_fsize;
sys/ufs/ffs/ffs_vfsops.c
1019
sbp->f_iosize = fs->fs_bsize;
sys/ufs/ffs/ffs_vfsops.c
1020
sbp->f_blocks = fs->fs_dsize;
sys/ufs/ffs/ffs_vfsops.c
1021
sbp->f_bfree = fs->fs_cstotal.cs_nbfree * fs->fs_frag +
sys/ufs/ffs/ffs_vfsops.c
1022
fs->fs_cstotal.cs_nffree;
sys/ufs/ffs/ffs_vfsops.c
1024
((int64_t)fs->fs_dsize * fs->fs_minfree / 100);
sys/ufs/ffs/ffs_vfsops.c
1025
sbp->f_files = fs->fs_ncg * fs->fs_ipg - ROOTINO;
sys/ufs/ffs/ffs_vfsops.c
1026
sbp->f_ffree = fs->fs_cstotal.cs_nifree;
sys/ufs/ffs/ffs_vfsops.c
107
struct fs *fs;
sys/ufs/ffs/ffs_vfsops.c
1104
struct fs *fs;
sys/ufs/ffs/ffs_vfsops.c
1108
fs = ump->um_fs;
sys/ufs/ffs/ffs_vfsops.c
111
fs = VFSTOUFS(mp)->um_fs;
sys/ufs/ffs/ffs_vfsops.c
1114
if (fs->fs_fmod != 0 && fs->fs_ronly != 0) {
sys/ufs/ffs/ffs_vfsops.c
1115
printf("fs = %s\n", fs->fs_fsmnt);
sys/ufs/ffs/ffs_vfsops.c
112
if (ino < ROOTINO || ino >= fs->fs_ncg * fs->fs_ipg)
sys/ufs/ffs/ffs_vfsops.c
1150
clean = fs->fs_clean;
sys/ufs/ffs/ffs_vfsops.c
1151
fmod = fs->fs_fmod;
sys/ufs/ffs/ffs_vfsops.c
1152
if (stall && fs->fs_ronly == 0) {
sys/ufs/ffs/ffs_vfsops.c
1153
fs->fs_fmod = 1;
sys/ufs/ffs/ffs_vfsops.c
1155
fs->fs_clean = (fs->fs_flags & FS_UNCLEAN) ? 0 : 1;
sys/ufs/ffs/ffs_vfsops.c
1161
fs->fs_clean = 0;
sys/ufs/ffs/ffs_vfsops.c
1168
if (fs->fs_fmod != 0 && (error = ffs_sbupdate(ump, waitfor)) != 0)
sys/ufs/ffs/ffs_vfsops.c
1170
fs->fs_clean = clean;
sys/ufs/ffs/ffs_vfsops.c
1171
fs->fs_fmod = fmod;
sys/ufs/ffs/ffs_vfsops.c
1185
struct fs *fs;
sys/ufs/ffs/ffs_vfsops.c
119
if (fs->fs_magic != FS_UFS2_MAGIC)
sys/ufs/ffs/ffs_vfsops.c
122
cg = ino_to_cg(fs, ino);
sys/ufs/ffs/ffs_vfsops.c
1221
ip->i_fs = fs = ump->um_fs;
sys/ufs/ffs/ffs_vfsops.c
1249
error = bread(ump->um_devvp, fsbtodb(fs, ino_to_fsba(fs, ino)),
sys/ufs/ffs/ffs_vfsops.c
125
error = bread(ump->um_devvp, fsbtodb(fs, cgtod(fs, cg)),
sys/ufs/ffs/ffs_vfsops.c
1250
(int)fs->fs_bsize, &bp);
sys/ufs/ffs/ffs_vfsops.c
126
(int)fs->fs_cgsize, &bp);
sys/ufs/ffs/ffs_vfsops.c
1267
dp2 = (struct ufs2_dinode *) bp->b_data + ino_to_fsbo(fs, ino);
sys/ufs/ffs/ffs_vfsops.c
1273
dp1 = (struct ufs1_dinode *) bp->b_data + ino_to_fsbo(fs, ino);
sys/ufs/ffs/ffs_vfsops.c
1306
if (fs->fs_magic == FS_UFS1_MAGIC && fs->fs_inodefmt < FS_44INODEFMT) {
sys/ufs/ffs/ffs_vfsops.c
1361
struct fs *dfs, *fs = mp->um_fs;
sys/ufs/ffs/ffs_vfsops.c
1370
blks = howmany(fs->fs_cssize, fs->fs_fsize);
sys/ufs/ffs/ffs_vfsops.c
1371
space = (caddr_t)fs->fs_csp;
sys/ufs/ffs/ffs_vfsops.c
1372
for (i = 0; i < blks; i += fs->fs_frag) {
sys/ufs/ffs/ffs_vfsops.c
1373
size = fs->fs_bsize;
sys/ufs/ffs/ffs_vfsops.c
1374
if (i + fs->fs_frag > blks)
sys/ufs/ffs/ffs_vfsops.c
1375
size = (blks - i) * fs->fs_fsize;
sys/ufs/ffs/ffs_vfsops.c
1376
bp = getblk(mp->um_devvp, fsbtodb(fs, fs->fs_csaddr + i),
sys/ufs/ffs/ffs_vfsops.c
138
if (cg * fs->fs_ipg + cgp->cg_initediblk < ino)
sys/ufs/ffs/ffs_vfsops.c
1396
fs->fs_sblockloc >> (fs->fs_fshift - fs->fs_fsbtodb),
sys/ufs/ffs/ffs_vfsops.c
1397
(int)fs->fs_sbsize, 0, INFSLP);
sys/ufs/ffs/ffs_vfsops.c
1398
fs->fs_fmod = 0;
sys/ufs/ffs/ffs_vfsops.c
1400
fs->fs_time = gettime();
sys/ufs/ffs/ffs_vfsops.c
1402
memcpy(bp->b_data, fs, fs->fs_sbsize);
sys/ufs/ffs/ffs_vfsops.c
1404
dfs = (struct fs *)bp->b_data; /* XXX */
sys/ufs/ffs/ffs_vfsops.c
1405
if (fs->fs_postblformat == FS_42POSTBLFMT) /* XXX */
sys/ufs/ffs/ffs_vfsops.c
1407
if (fs->fs_inodefmt < FS_44INODEFMT) { /* XXX */
sys/ufs/ffs/ffs_vfsops.c
157
struct fs *fs;
sys/ufs/ffs/ffs_vfsops.c
191
fs = ump->um_fs;
sys/ufs/ffs/ffs_vfsops.c
192
strlcpy(fs->fs_fsmnt, mp->mnt_stat.f_mntonname, sizeof(fs->fs_fsmnt));
sys/ufs/ffs/ffs_vfsops.c
195
inittodr(fs->fs_time);
sys/ufs/ffs/ffs_vfsops.c
212
struct fs *fs;
sys/ufs/ffs/ffs_vfsops.c
224
fs = ump->um_fs;
sys/ufs/ffs/ffs_vfsops.c
227
ronly = fs->fs_ronly;
sys/ufs/ffs/ffs_vfsops.c
252
if (fs->fs_clean == 0) {
sys/ufs/ffs/ffs_vfsops.c
256
fs->fs_fsmnt);
sys/ufs/ffs/ffs_vfsops.c
260
fs->fs_fsmnt);
sys/ufs/ffs/ffs_vfsops.c
266
fs->fs_contigdirs = malloc((u_long)fs->fs_ncg,
sys/ufs/ffs/ffs_vfsops.c
373
fs = ump->um_fs;
sys/ufs/ffs/ffs_vfsops.c
374
if (ronly != fs->fs_ronly) {
sys/ufs/ffs/ffs_vfsops.c
375
fs->fs_ronly = ronly;
sys/ufs/ffs/ffs_vfsops.c
376
fs->fs_clean = ronly &&
sys/ufs/ffs/ffs_vfsops.c
377
(fs->fs_flags & FS_UNCLEAN) == 0 ? 1 : 0;
sys/ufs/ffs/ffs_vfsops.c
379
free(fs->fs_contigdirs, M_UFSMNT, fs->fs_ncg);
sys/ufs/ffs/ffs_vfsops.c
405
struct fs *fs;
sys/ufs/ffs/ffs_vfsops.c
442
fsbtodb(fra->fs, ino_to_fsba(fra->fs, ip->i_number)),
sys/ufs/ffs/ffs_vfsops.c
443
(int)fra->fs->fs_bsize, &bp);
sys/ufs/ffs/ffs_vfsops.c
450
if (fra->fs->fs_magic == FS_UFS1_MAGIC)
sys/ufs/ffs/ffs_vfsops.c
452
ino_to_fsbo(fra->fs, ip->i_number));
sys/ufs/ffs/ffs_vfsops.c
456
ino_to_fsbo(fra->fs, ip->i_number));
sys/ufs/ffs/ffs_vfsops.c
482
struct fs *fs, *newfs;
sys/ufs/ffs/ffs_vfsops.c
503
fs = VFSTOUFS(mountp)->um_fs;
sys/ufs/ffs/ffs_vfsops.c
505
error = bread(devvp, fs->fs_sblockloc / DEV_BSIZE, SBSIZE, &bp);
sys/ufs/ffs/ffs_vfsops.c
511
newfs = (struct fs *)bp->b_data;
sys/ufs/ffs/ffs_vfsops.c
522
newfs->fs_csp = fs->fs_csp;
sys/ufs/ffs/ffs_vfsops.c
523
newfs->fs_maxcluster = fs->fs_maxcluster;
sys/ufs/ffs/ffs_vfsops.c
524
newfs->fs_ronly = fs->fs_ronly;
sys/ufs/ffs/ffs_vfsops.c
525
memcpy(fs, newfs, fs->fs_sbsize);
sys/ufs/ffs/ffs_vfsops.c
526
if (fs->fs_sbsize < SBSIZE)
sys/ufs/ffs/ffs_vfsops.c
529
VFSTOUFS(mountp)->um_maxsymlinklen = fs->fs_maxsymlinklen;
sys/ufs/ffs/ffs_vfsops.c
530
ffs1_compat_read(fs, VFSTOUFS(mountp), fs->fs_sblockloc);
sys/ufs/ffs/ffs_vfsops.c
531
ffs_oldfscompat(fs);
sys/ufs/ffs/ffs_vfsops.c
536
blks = howmany(fs->fs_cssize, fs->fs_fsize);
sys/ufs/ffs/ffs_vfsops.c
537
space = (caddr_t)fs->fs_csp;
sys/ufs/ffs/ffs_vfsops.c
538
for (i = 0; i < blks; i += fs->fs_frag) {
sys/ufs/ffs/ffs_vfsops.c
539
size = fs->fs_bsize;
sys/ufs/ffs/ffs_vfsops.c
540
if (i + fs->fs_frag > blks)
sys/ufs/ffs/ffs_vfsops.c
541
size = (blks - i) * fs->fs_fsize;
sys/ufs/ffs/ffs_vfsops.c
542
error = bread(devvp, fsbtodb(fs, fs->fs_csaddr + i), size, &bp);
sys/ufs/ffs/ffs_vfsops.c
554
if (fs->fs_contigsumsize > 0) {
sys/ufs/ffs/ffs_vfsops.c
555
lp = fs->fs_maxcluster;
sys/ufs/ffs/ffs_vfsops.c
556
for (i = 0; i < fs->fs_ncg; i++)
sys/ufs/ffs/ffs_vfsops.c
557
*lp++ = fs->fs_contigsumsize;
sys/ufs/ffs/ffs_vfsops.c
562
fra.fs = fs;
sys/ufs/ffs/ffs_vfsops.c
574
ffs_validate(struct fs *fsp)
sys/ufs/ffs/ffs_vfsops.c
587
if ((u_int)fsp->fs_bsize < sizeof(struct fs))
sys/ufs/ffs/ffs_vfsops.c
617
struct fs *fs;
sys/ufs/ffs/ffs_vfsops.c
666
fs = (struct fs *) bp->b_data;
sys/ufs/ffs/ffs_vfsops.c
674
if (fs->fs_magic == FS_UFS1_MAGIC && sbloc == SBLOCK_UFS2)
sys/ufs/ffs/ffs_vfsops.c
677
if (ffs_validate(fs))
sys/ufs/ffs/ffs_vfsops.c
686
fs->fs_fmod = 0;
sys/ufs/ffs/ffs_vfsops.c
687
fs->fs_flags &= ~FS_UNCLEAN;
sys/ufs/ffs/ffs_vfsops.c
688
if (fs->fs_clean == 0) {
sys/ufs/ffs/ffs_vfsops.c
692
fs->fs_fsmnt);
sys/ufs/ffs/ffs_vfsops.c
696
fs->fs_fsmnt);
sys/ufs/ffs/ffs_vfsops.c
70
int ffs_validate(struct fs *);
sys/ufs/ffs/ffs_vfsops.c
702
if (fs->fs_postblformat == FS_42POSTBLFMT && !ronly) {
sys/ufs/ffs/ffs_vfsops.c
712
ump->um_fs = malloc((u_long)fs->fs_sbsize, M_UFSMNT,
sys/ufs/ffs/ffs_vfsops.c
715
if (fs->fs_magic == FS_UFS1_MAGIC)
sys/ufs/ffs/ffs_vfsops.c
72
void ffs1_compat_read(struct fs *, struct ufsmount *, daddr_t);
sys/ufs/ffs/ffs_vfsops.c
722
memcpy(ump->um_fs, bp->b_data, fs->fs_sbsize);
sys/ufs/ffs/ffs_vfsops.c
723
if (fs->fs_sbsize < SBSIZE)
sys/ufs/ffs/ffs_vfsops.c
727
fs = ump->um_fs;
sys/ufs/ffs/ffs_vfsops.c
729
ffs1_compat_read(fs, ump, sbloc);
sys/ufs/ffs/ffs_vfsops.c
73
void ffs1_compat_write(struct fs *, struct ufsmount *);
sys/ufs/ffs/ffs_vfsops.c
731
if (fs->fs_clean == 0)
sys/ufs/ffs/ffs_vfsops.c
732
fs->fs_flags |= FS_UNCLEAN;
sys/ufs/ffs/ffs_vfsops.c
733
fs->fs_ronly = ronly;
sys/ufs/ffs/ffs_vfsops.c
734
size = fs->fs_cssize;
sys/ufs/ffs/ffs_vfsops.c
735
blks = howmany(size, fs->fs_fsize);
sys/ufs/ffs/ffs_vfsops.c
736
if (fs->fs_contigsumsize > 0)
sys/ufs/ffs/ffs_vfsops.c
737
size += fs->fs_ncg * sizeof(int32_t);
sys/ufs/ffs/ffs_vfsops.c
739
fs->fs_csp = (struct csum *)space;
sys/ufs/ffs/ffs_vfsops.c
740
for (i = 0; i < blks; i += fs->fs_frag) {
sys/ufs/ffs/ffs_vfsops.c
741
size = fs->fs_bsize;
sys/ufs/ffs/ffs_vfsops.c
742
if (i + fs->fs_frag > blks)
sys/ufs/ffs/ffs_vfsops.c
743
size = (blks - i) * fs->fs_fsize;
sys/ufs/ffs/ffs_vfsops.c
744
error = bread(devvp, fsbtodb(fs, fs->fs_csaddr + i), size, &bp);
sys/ufs/ffs/ffs_vfsops.c
746
free(fs->fs_csp, M_UFSMNT, 0);
sys/ufs/ffs/ffs_vfsops.c
754
if (fs->fs_contigsumsize > 0) {
sys/ufs/ffs/ffs_vfsops.c
755
fs->fs_maxcluster = lp = (int32_t *)space;
sys/ufs/ffs/ffs_vfsops.c
756
for (i = 0; i < fs->fs_ncg; i++)
sys/ufs/ffs/ffs_vfsops.c
757
*lp++ = fs->fs_contigsumsize;
sys/ufs/ffs/ffs_vfsops.c
762
if (fs->fs_id[0] != 0 && fs->fs_id[1] != 0)
sys/ufs/ffs/ffs_vfsops.c
763
mp->mnt_stat.f_fsid.val[1] = fs->fs_id[1];
sys/ufs/ffs/ffs_vfsops.c
771
ump->um_nindir = fs->fs_nindir;
sys/ufs/ffs/ffs_vfsops.c
772
ump->um_bptrtodb = fs->fs_fsbtodb;
sys/ufs/ffs/ffs_vfsops.c
773
ump->um_seqinc = fs->fs_frag;
sys/ufs/ffs/ffs_vfsops.c
774
ump->um_maxsymlinklen = fs->fs_maxsymlinklen;
sys/ufs/ffs/ffs_vfsops.c
779
ffs_oldfscompat(fs);
sys/ufs/ffs/ffs_vfsops.c
782
fs->fs_contigdirs = NULL;
sys/ufs/ffs/ffs_vfsops.c
784
fs->fs_contigdirs = malloc((u_long)fs->fs_ncg,
sys/ufs/ffs/ffs_vfsops.c
791
memset(fs->fs_fsmnt, 0, sizeof(fs->fs_fsmnt));
sys/ufs/ffs/ffs_vfsops.c
792
strlcpy(fs->fs_fsmnt, mp->mnt_stat.f_mntonname, sizeof(fs->fs_fsmnt));
sys/ufs/ffs/ffs_vfsops.c
801
mp->mnt_time = fs->fs_time;
sys/ufs/ffs/ffs_vfsops.c
812
ump->um_savedmaxfilesize = fs->fs_maxfilesize; /* XXX */
sys/ufs/ffs/ffs_vfsops.c
813
maxfilesize = FS_KERNMAXFILESIZE(PAGE_SIZE, fs);
sys/ufs/ffs/ffs_vfsops.c
814
if (fs->fs_maxfilesize > maxfilesize) /* XXX */
sys/ufs/ffs/ffs_vfsops.c
815
fs->fs_maxfilesize = maxfilesize; /* XXX */
sys/ufs/ffs/ffs_vfsops.c
817
fs->fs_fmod = 1;
sys/ufs/ffs/ffs_vfsops.c
818
fs->fs_clean = 0;
sys/ufs/ffs/ffs_vfsops.c
846
ffs_oldfscompat(struct fs *fs)
sys/ufs/ffs/ffs_vfsops.c
850
fs->fs_npsect = max(fs->fs_npsect, fs->fs_nsect); /* XXX */
sys/ufs/ffs/ffs_vfsops.c
851
fs->fs_interleave = max(fs->fs_interleave, 1); /* XXX */
sys/ufs/ffs/ffs_vfsops.c
852
if (fs->fs_postblformat == FS_42POSTBLFMT) /* XXX */
sys/ufs/ffs/ffs_vfsops.c
853
fs->fs_nrpos = 8; /* XXX */
sys/ufs/ffs/ffs_vfsops.c
854
if (fs->fs_inodefmt < FS_44INODEFMT) { /* XXX */
sys/ufs/ffs/ffs_vfsops.c
855
u_int64_t sizepb = fs->fs_bsize; /* XXX */
sys/ufs/ffs/ffs_vfsops.c
857
fs->fs_maxfilesize = fs->fs_bsize * NDADDR - 1; /* XXX */
sys/ufs/ffs/ffs_vfsops.c
859
sizepb *= NINDIR(fs); /* XXX */
sys/ufs/ffs/ffs_vfsops.c
860
fs->fs_maxfilesize += sizepb; /* XXX */
sys/ufs/ffs/ffs_vfsops.c
862
fs->fs_qbmask = ~fs->fs_bmask; /* XXX */
sys/ufs/ffs/ffs_vfsops.c
863
fs->fs_qfmask = ~fs->fs_fmask; /* XXX */
sys/ufs/ffs/ffs_vfsops.c
865
if (fs->fs_avgfilesize <= 0) /* XXX */
sys/ufs/ffs/ffs_vfsops.c
866
fs->fs_avgfilesize = AVFILESIZ; /* XXX */
sys/ufs/ffs/ffs_vfsops.c
867
if (fs->fs_avgfpdir <= 0) /* XXX */
sys/ufs/ffs/ffs_vfsops.c
868
fs->fs_avgfpdir = AFPDIR; /* XXX */
sys/ufs/ffs/ffs_vfsops.c
876
ffs1_compat_read(struct fs *fs, struct ufsmount *ump, daddr_t sbloc)
sys/ufs/ffs/ffs_vfsops.c
878
if (fs->fs_magic == FS_UFS2_MAGIC)
sys/ufs/ffs/ffs_vfsops.c
881
if (fs->fs_ffs1_flags & FS_FLAGS_UPDATED)
sys/ufs/ffs/ffs_vfsops.c
884
fs->fs_flags = fs->fs_ffs1_flags;
sys/ufs/ffs/ffs_vfsops.c
885
fs->fs_sblockloc = sbloc;
sys/ufs/ffs/ffs_vfsops.c
886
fs->fs_maxbsize = fs->fs_bsize;
sys/ufs/ffs/ffs_vfsops.c
887
fs->fs_time = fs->fs_ffs1_time;
sys/ufs/ffs/ffs_vfsops.c
888
fs->fs_size = fs->fs_ffs1_size;
sys/ufs/ffs/ffs_vfsops.c
889
fs->fs_dsize = fs->fs_ffs1_dsize;
sys/ufs/ffs/ffs_vfsops.c
890
fs->fs_csaddr = fs->fs_ffs1_csaddr;
sys/ufs/ffs/ffs_vfsops.c
891
fs->fs_cstotal.cs_ndir = fs->fs_ffs1_cstotal.cs_ndir;
sys/ufs/ffs/ffs_vfsops.c
892
fs->fs_cstotal.cs_nbfree = fs->fs_ffs1_cstotal.cs_nbfree;
sys/ufs/ffs/ffs_vfsops.c
893
fs->fs_cstotal.cs_nifree = fs->fs_ffs1_cstotal.cs_nifree;
sys/ufs/ffs/ffs_vfsops.c
894
fs->fs_cstotal.cs_nffree = fs->fs_ffs1_cstotal.cs_nffree;
sys/ufs/ffs/ffs_vfsops.c
895
fs->fs_ffs1_flags |= FS_FLAGS_UPDATED;
sys/ufs/ffs/ffs_vfsops.c
902
ffs1_compat_write(struct fs *fs, struct ufsmount *ump)
sys/ufs/ffs/ffs_vfsops.c
904
if (fs->fs_magic != FS_UFS1_MAGIC)
sys/ufs/ffs/ffs_vfsops.c
907
fs->fs_ffs1_time = fs->fs_time;
sys/ufs/ffs/ffs_vfsops.c
908
fs->fs_ffs1_cstotal.cs_ndir = fs->fs_cstotal.cs_ndir;
sys/ufs/ffs/ffs_vfsops.c
909
fs->fs_ffs1_cstotal.cs_nbfree = fs->fs_cstotal.cs_nbfree;
sys/ufs/ffs/ffs_vfsops.c
910
fs->fs_ffs1_cstotal.cs_nifree = fs->fs_cstotal.cs_nifree;
sys/ufs/ffs/ffs_vfsops.c
911
fs->fs_ffs1_cstotal.cs_nffree = fs->fs_cstotal.cs_nffree;
sys/ufs/ffs/ffs_vfsops.c
921
struct fs *fs;
sys/ufs/ffs/ffs_vfsops.c
929
fs = ump->um_fs;
sys/ufs/ffs/ffs_vfsops.c
934
if (fs->fs_ronly == 0) {
sys/ufs/ffs/ffs_vfsops.c
935
fs->fs_clean = (fs->fs_flags & FS_UNCLEAN) ? 0 : 1;
sys/ufs/ffs/ffs_vfsops.c
939
fs->fs_clean = 0;
sys/ufs/ffs/ffs_vfsops.c
942
free(fs->fs_contigdirs, M_UFSMNT, fs->fs_ncg);
sys/ufs/ffs/ffs_vfsops.c
948
(void)VOP_CLOSE(ump->um_devvp, fs->fs_ronly ? FREAD : FREAD|FWRITE,
sys/ufs/ffs/ffs_vfsops.c
951
free(fs->fs_csp, M_UFSMNT, 0);
sys/ufs/ffs/ffs_vfsops.c
952
free(fs, M_UFSMNT, fs->fs_sbsize);
sys/ufs/ffs/ffs_vnops.c
187
struct fs *fs;
sys/ufs/ffs/ffs_vnops.c
210
fs = ip->i_fs;
sys/ufs/ffs/ffs_vnops.c
219
lbn = lblkno(fs, uio->uio_offset);
sys/ufs/ffs/ffs_vnops.c
221
size = fs->fs_bsize; /* WAS blksize(fs, ip, lbn); */
sys/ufs/ffs/ffs_vnops.c
222
blkoffset = blkoff(fs, uio->uio_offset);
sys/ufs/ffs/ffs_vnops.c
223
xfersize = fs->fs_bsize - blkoffset;
sys/ufs/ffs/ffs_vnops.c
229
if (lblktosize(fs, nextlbn) >= DIP(ip, size))
sys/ufs/ffs/ffs_vnops.c
278
struct fs *fs;
sys/ufs/ffs/ffs_vnops.c
321
fs = ip->i_fs;
sys/ufs/ffs/ffs_vnops.c
323
(u_int64_t)uio->uio_offset + uio->uio_resid > fs->fs_maxfilesize)
sys/ufs/ffs/ffs_vnops.c
335
lbn = lblkno(fs, uio->uio_offset);
sys/ufs/ffs/ffs_vnops.c
336
blkoffset = blkoff(fs, uio->uio_offset);
sys/ufs/ffs/ffs_vnops.c
337
xfersize = fs->fs_bsize - blkoffset;
sys/ufs/ffs/ffs_vnops.c
340
if (fs->fs_bsize > xfersize)
sys/ufs/ffs/ffs_vnops.c
355
size = blksize(fs, ip, lbn) - bp->b_resid;
sys/ufs/ffs/ffs_vnops.c
378
else if (xfersize + blkoffset == fs->fs_bsize) {
sys/ufs/ffs/fs.h
345
#define fs_rotbl(fs) \
sys/ufs/ffs/fs.h
346
(((fs)->fs_postblformat == FS_42POSTBLFMT) \
sys/ufs/ffs/fs.h
347
? ((fs)->fs_space) \
sys/ufs/ffs/fs.h
348
: ((u_int8_t *)((u_int8_t *)(fs) + (fs)->fs_rotbloff)))
sys/ufs/ffs/fs.h
356
#define CGSIZE(fs) \
sys/ufs/ffs/fs.h
358
/* blktot size */ (fs)->fs_cpg * sizeof(int32_t) + \
sys/ufs/ffs/fs.h
359
/* blks size */ (fs)->fs_cpg * (fs)->fs_nrpos * sizeof(int16_t) + \
sys/ufs/ffs/fs.h
360
/* inode map */ howmany((fs)->fs_ipg, NBBY) + \
sys/ufs/ffs/fs.h
361
/* block map */ howmany((fs)->fs_fpg, NBBY) + \
sys/ufs/ffs/fs.h
362
/* if present */ ((fs)->fs_contigsumsize <= 0 ? 0 : \
sys/ufs/ffs/fs.h
363
/* cluster sum */ (fs)->fs_contigsumsize * sizeof(int32_t) + \
sys/ufs/ffs/fs.h
364
/* cluster map */ howmany(fragstoblks(fs, (fs)->fs_fpg), NBBY)))
sys/ufs/ffs/fs.h
369
#define fs_cs(fs, indx) fs_csp[indx]
sys/ufs/ffs/fs.h
411
#define cg_blks(fs, cgp, cylno) \
sys/ufs/ffs/fs.h
415
(cgp)->cg_boff) + (cylno) * (fs)->fs_nrpos))
sys/ufs/ffs/fs.h
461
#define fsbtodb(fs, b) ((b) << (fs)->fs_fsbtodb)
sys/ufs/ffs/fs.h
462
#define dbtofsb(fs, b) ((b) >> (fs)->fs_fsbtodb)
sys/ufs/ffs/fs.h
468
#define cgbase(fs, c) ((daddr_t)(fs)->fs_fpg * (c))
sys/ufs/ffs/fs.h
469
#define cgdata(fs, c) (cgdmin(fs, c) + (fs)->fs_minfree) /* data zone */
sys/ufs/ffs/fs.h
470
#define cgmeta(fs, c) (cgdmin(fs, c)) /* meta data */
sys/ufs/ffs/fs.h
471
#define cgdmin(fs, c) (cgstart(fs, c) + (fs)->fs_dblkno) /* 1st data */
sys/ufs/ffs/fs.h
472
#define cgimin(fs, c) (cgstart(fs, c) + (fs)->fs_iblkno) /* inode blk */
sys/ufs/ffs/fs.h
473
#define cgsblock(fs, c) (cgstart(fs, c) + (fs)->fs_sblkno) /* super blk */
sys/ufs/ffs/fs.h
474
#define cgtod(fs, c) (cgstart(fs, c) + (fs)->fs_cblkno) /* cg block */
sys/ufs/ffs/fs.h
475
#define cgstart(fs, c) \
sys/ufs/ffs/fs.h
476
(cgbase(fs, c) + (fs)->fs_cgoffset * ((c) & ~((fs)->fs_cgmask)))
sys/ufs/ffs/fs.h
484
#define ino_to_cg(fs, x) ((x) / (fs)->fs_ipg)
sys/ufs/ffs/fs.h
485
#define ino_to_fsba(fs, x) \
sys/ufs/ffs/fs.h
486
((daddr_t)(cgimin(fs, ino_to_cg(fs, x)) + \
sys/ufs/ffs/fs.h
487
(blkstofrags((fs), (((x) % (fs)->fs_ipg) / INOPB(fs))))))
sys/ufs/ffs/fs.h
488
#define ino_to_fsbo(fs, x) ((x) % INOPB(fs))
sys/ufs/ffs/fs.h
494
#define dtog(fs, d) ((d) / (fs)->fs_fpg)
sys/ufs/ffs/fs.h
495
#define dtogd(fs, d) ((d) % (fs)->fs_fpg)
sys/ufs/ffs/fs.h
501
#define blkmap(fs, map, loc) \
sys/ufs/ffs/fs.h
502
(((map)[(loc) / NBBY] >> ((loc) % NBBY)) & (0xff >> (NBBY - (fs)->fs_frag)))
sys/ufs/ffs/fs.h
503
#define cbtocylno(fs, bno) \
sys/ufs/ffs/fs.h
504
(fsbtodb(fs, bno) / (fs)->fs_spc)
sys/ufs/ffs/fs.h
505
#define cbtorpos(fs, bno) \
sys/ufs/ffs/fs.h
506
((fs)->fs_nrpos <= 1 ? 0 : \
sys/ufs/ffs/fs.h
507
(fsbtodb(fs, bno) % (fs)->fs_spc / (fs)->fs_nsect * (fs)->fs_trackskew + \
sys/ufs/ffs/fs.h
508
fsbtodb(fs, bno) % (fs)->fs_spc % (fs)->fs_nsect * (fs)->fs_interleave) % \
sys/ufs/ffs/fs.h
509
(fs)->fs_nsect * (fs)->fs_nrpos / (fs)->fs_npsect)
sys/ufs/ffs/fs.h
516
#define blkoff(fs, loc) /* calculates (loc % fs->fs_bsize) */ \
sys/ufs/ffs/fs.h
517
((loc) & (fs)->fs_qbmask)
sys/ufs/ffs/fs.h
518
#define fragoff(fs, loc) /* calculates (loc % fs->fs_fsize) */ \
sys/ufs/ffs/fs.h
519
((loc) & (fs)->fs_qfmask)
sys/ufs/ffs/fs.h
520
#define lblktosize(fs, blk) /* calculates ((off_t)blk * fs->fs_bsize) */ \
sys/ufs/ffs/fs.h
521
((off_t)(blk) << (fs)->fs_bshift)
sys/ufs/ffs/fs.h
522
#define lblkno(fs, loc) /* calculates (loc / fs->fs_bsize) */ \
sys/ufs/ffs/fs.h
523
((loc) >> (fs)->fs_bshift)
sys/ufs/ffs/fs.h
524
#define numfrags(fs, loc) /* calculates (loc / fs->fs_fsize) */ \
sys/ufs/ffs/fs.h
525
((loc) >> (fs)->fs_fshift)
sys/ufs/ffs/fs.h
526
#define blkroundup(fs, size) /* calculates roundup(size, fs->fs_bsize) */ \
sys/ufs/ffs/fs.h
527
(((size) + (fs)->fs_qbmask) & (fs)->fs_bmask)
sys/ufs/ffs/fs.h
528
#define fragroundup(fs, size) /* calculates roundup(size, fs->fs_fsize) */ \
sys/ufs/ffs/fs.h
529
(((size) + (fs)->fs_qfmask) & (fs)->fs_fmask)
sys/ufs/ffs/fs.h
530
#define fragstoblks(fs, frags) /* calculates (frags / fs->fs_frag) */ \
sys/ufs/ffs/fs.h
531
((frags) >> (fs)->fs_fragshift)
sys/ufs/ffs/fs.h
532
#define blkstofrags(fs, blks) /* calculates (blks * fs->fs_frag) */ \
sys/ufs/ffs/fs.h
533
((blks) << (fs)->fs_fragshift)
sys/ufs/ffs/fs.h
534
#define fragnum(fs, fsb) /* calculates (fsb % fs->fs_frag) */ \
sys/ufs/ffs/fs.h
535
((fsb) & ((fs)->fs_frag - 1))
sys/ufs/ffs/fs.h
536
#define blknum(fs, fsb) /* calculates rounddown(fsb, fs->fs_frag) */ \
sys/ufs/ffs/fs.h
537
((fsb) &~ ((fs)->fs_frag - 1))
sys/ufs/ffs/fs.h
543
#define freespace(fs, percentreserved) \
sys/ufs/ffs/fs.h
544
(blkstofrags((fs), (fs)->fs_cstotal.cs_nbfree) + \
sys/ufs/ffs/fs.h
545
(fs)->fs_cstotal.cs_nffree - ((fs)->fs_dsize * (percentreserved) / 100))
sys/ufs/ffs/fs.h
550
#define blksize(fs, ip, lbn) \
sys/ufs/ffs/fs.h
551
(((lbn) >= NDADDR || DIP((ip), size) >= ((lbn) + 1) << (fs)->fs_bshift) \
sys/ufs/ffs/fs.h
552
? (u_int64_t)(fs)->fs_bsize \
sys/ufs/ffs/fs.h
553
: (fragroundup(fs, blkoff(fs, DIP((ip), size)))))
sys/ufs/ffs/fs.h
554
#define dblksize(fs, dip, lbn) \
sys/ufs/ffs/fs.h
555
(((lbn) >= NDADDR || (dip)->di_size >= ((lbn) + 1) << (fs)->fs_bshift) \
sys/ufs/ffs/fs.h
556
? (u_int64_t)(fs)->fs_bsize \
sys/ufs/ffs/fs.h
557
: (fragroundup(fs, blkoff(fs, (dip)->di_size))))
sys/ufs/ffs/fs.h
559
#define sblksize(fs, size, lbn) \
sys/ufs/ffs/fs.h
560
(((lbn) >= NDADDR || (size) >= ((lbn) + 1) << (fs)->fs_bshift) \
sys/ufs/ffs/fs.h
561
? (u_int64_t)(fs)->fs_bsize \
sys/ufs/ffs/fs.h
562
: (fragroundup(fs, blkoff(fs, (size)))))
sys/ufs/ffs/fs.h
569
#define NSPB(fs) ((fs)->fs_nspf << (fs)->fs_fragshift)
sys/ufs/ffs/fs.h
570
#define NSPF(fs) ((fs)->fs_nspf)
sys/ufs/ffs/fs.h
573
#define INOPB(fs) ((fs)->fs_inopb)
sys/ufs/ffs/fs.h
575
#define INOPF(fs) ((fs)->fs_inopb >> (fs)->fs_fragshift)
sys/ufs/ffs/fs.h
580
#define NINDIR(fs) ((fs)->fs_nindir)
sys/ufs/ffs/fs.h
587
#define FS_KERNMAXFILESIZE(pgsiz, fs) ((u_int64_t)0x80000000 * \
sys/ufs/ffs/fs.h
588
MIN((pgsiz), (fs)->fs_bsize) - 1)
sys/ufs/mfs/mfs_vfsops.c
100
fs = ump->um_fs;
sys/ufs/mfs/mfs_vfsops.c
101
if (fs->fs_ronly == 0 && (mp->mnt_flag & MNT_RDONLY)) {
sys/ufs/mfs/mfs_vfsops.c
109
if (fs->fs_ronly && (mp->mnt_flag & MNT_WANTRDWR))
sys/ufs/mfs/mfs_vfsops.c
110
fs->fs_ronly = 0;
sys/ufs/mfs/mfs_vfsops.c
141
fs = ump->um_fs;
sys/ufs/mfs/mfs_vfsops.c
143
memset(fs->fs_fsmnt, 0, sizeof(fs->fs_fsmnt));
sys/ufs/mfs/mfs_vfsops.c
144
strlcpy(fs->fs_fsmnt, path, sizeof(fs->fs_fsmnt));
sys/ufs/mfs/mfs_vfsops.c
145
memcpy(mp->mnt_stat.f_mntonname, fs->fs_fsmnt, MNAMELEN);
sys/ufs/mfs/mfs_vfsops.c
89
struct fs *fs;
sys/ufs/ufs/inode.h
78
struct fs *fs; /* FFS */
sys/ufs/ufs/inode.h
82
#define i_fs inode_u.fs
sys/ufs/ufs/ufsmount.h
52
struct fs *fs; /* FFS */
sys/ufs/ufs/ufsmount.h
55
#define um_fs ufsmount_u.fs
usr.bin/awk/lib.c
583
int refldbld(const char *rec, const char *fs) /* build fields from reg expr in FS */
usr.bin/awk/lib.c
602
pfa = makedfa(fs, 1);
usr.bin/awk/lib.c
603
DPRINTF("into refldbld, rec = <%s>, pat = <%s>\n", rec, fs);
usr.bin/awk/main.c
155
const char *fs = NULL;
usr.bin/awk/main.c
217
fs = setfs(getarg(&argc, &argv, "no field separator"));
usr.bin/awk/main.c
267
if (CSV && (fs != NULL || lookup("FS", symtab) != NULL))
usr.bin/awk/main.c
296
if (fs)
usr.bin/awk/main.c
297
*FS = qstring(fs, '\0');
usr.bin/awk/run.c
1668
const char *fs = NULL;
usr.bin/awk/run.c
1682
fs = getsval(fsloc);
usr.bin/awk/run.c
1685
fs = origfs = strdup(getsval(x));
usr.bin/awk/run.c
1686
if (fs == NULL)
usr.bin/awk/run.c
1690
fs = "(regexpr)"; /* split(str,arr,/regexpr/) */
usr.bin/awk/run.c
1694
sep = *fs;
usr.bin/awk/run.c
1698
DPRINTF("split: s=|%s|, a=%s, sep=|%s|\n", s, NN(ap->nval), fs);
usr.bin/awk/run.c
1707
fs = "";
usr.bin/awk/run.c
1710
if (*s != '\0' && (strlen(fs) > 1 || arg3type == REGEXPR)) { /* reg expr */
usr.bin/awk/run.c
1715
pfa = makedfa(fs, 1);
usr.bin/compress/main.c
791
setfile(const char *name, int fd, struct stat *fs)
usr.bin/compress/main.c
814
fs->st_mode &= ACCESSPERMS;
usr.bin/compress/main.c
815
if (fchown(fd, fs->st_uid, fs->st_gid)) {
usr.bin/compress/main.c
818
fs->st_mode &= ~(S_ISUID|S_ISGID);
usr.bin/compress/main.c
820
if (fchmod(fd, fs->st_mode))
usr.bin/compress/main.c
823
if (fs->st_flags && fchflags(fd, fs->st_flags))
usr.bin/compress/main.c
826
ts[0] = fs->st_atim;
usr.bin/compress/main.c
827
ts[1] = fs->st_mtim;
usr.bin/hexdump/display.c
60
FS *fs;
usr.bin/hexdump/display.c
70
for (fs = fshead, savebp = bp, saveaddress = address; fs;
usr.bin/hexdump/display.c
71
fs = fs->nextfs, bp = savebp, address = saveaddress)
usr.bin/hexdump/display.c
72
for (fu = fs->nextfu; fu; fu = fu->nextfu) {
usr.bin/hexdump/parse.c
155
size(FS *fs)
usr.bin/hexdump/parse.c
163
for (cursize = 0, fu = fs->nextfu; fu; fu = fu->nextfu) {
usr.bin/hexdump/parse.c
208
rewrite(FS *fs)
usr.bin/hexdump/parse.c
219
for (fu = fs->nextfu; fu; fu = fu->nextfu) {
usr.bin/hexdump/parse.c
432
for (fu = fs->nextfu; fu; fu = fu->nextfu) {
usr.bin/hexdump/parse.c
433
if (!fu->nextfu && fs->bcnt < blocksize &&
usr.bin/hexdump/parse.c
435
fu->reps += (blocksize - fs->bcnt) / fu->bcnt;
usr.bin/hexdump/parse.c
449
for (fu = fs->nextfu; fu; fu = fu->nextfu) {
usr.bin/lndir/lndir.c
129
if (stat(fn, &fs) == -1)
usr.bin/lndir/lndir.c
131
if (!(S_ISDIR(fs.st_mode)))
usr.bin/lndir/lndir.c
134
exit(dodir(fn, &fs, &ts, 0));
usr.bin/lndir/lndir.c
179
struct stat *fs, *ts; /* stats for the "from" directory and cwd */
usr.bin/lndir/lndir.c
183
dodir(char *fn, struct stat *fs, struct stat *ts, int rel)
usr.bin/lndir/lndir.c
194
if (fs->st_dev == ts->st_dev && fs->st_ino == ts->st_ino) {
usr.bin/lndir/lndir.c
212
n_dirs = fs->st_nlink;
usr.bin/lndir/lndir.c
85
struct stat fs, ts;
usr.bin/quota/quota.c
433
struct fstab *fs;
usr.bin/quota/quota.c
463
if ((fs = getfsspec(fst[i].f_mntfromspec)) == NULL)
usr.bin/quota/quota.c
465
if (getufsquota(&fst[i], fs, qup, id, quotatype) == 0)
usr.bin/quota/quota.c
488
ufshasquota(struct fstab *fs, int type, char **qfnamep)
usr.bin/quota/quota.c
502
strncpy(buf, fs->fs_mntops, sizeof buf);
usr.bin/quota/quota.c
519
fs->fs_file, qfname, qfextension[type]);
usr.bin/quota/quota.c
525
getufsquota(struct statfs *fst, struct fstab *fs, struct quotause *qup,
usr.bin/quota/quota.c
532
if (!ufshasquota(fs, quotatype, &qfpathname))
usr.bin/quota/quota.c
535
if (quotactl(fs->fs_file, qcmd, id, (char *)&qup->dqblk) != 0) {
usr.bin/quota/quota.c
562
getnfsquota(struct statfs *fst, struct fstab *fs, struct quotause *qup,
usr.bin/tmux/arguments.c
815
cmd_find_copy_state(&state->pi.fs, target);
usr.bin/tmux/cmd-find.c
1004
if (!cmd_find_valid_state(fs->current))
usr.bin/tmux/cmd-find.c
1019
fs->wl = c->session->curw;
usr.bin/tmux/cmd-find.c
1020
fs->wp = c->session->curw->window->active;
usr.bin/tmux/cmd-find.c
1021
fs->w = c->session->curw->window;
usr.bin/tmux/cmd-find.c
1030
fs->wp = cmd_mouse_pane(m, &fs->s, &fs->wl);
usr.bin/tmux/cmd-find.c
1031
if (fs->wp != NULL) {
usr.bin/tmux/cmd-find.c
1032
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
1038
fs->wl = cmd_mouse_window(m, &fs->s);
usr.bin/tmux/cmd-find.c
1039
if (fs->wl == NULL && fs->s != NULL)
usr.bin/tmux/cmd-find.c
1040
fs->wl = fs->s->curw;
usr.bin/tmux/cmd-find.c
1041
if (fs->wl != NULL) {
usr.bin/tmux/cmd-find.c
1042
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
1043
fs->wp = fs->w->active;
usr.bin/tmux/cmd-find.c
1047
if (fs->wp == NULL) {
usr.bin/tmux/cmd-find.c
1062
cmd_find_copy_state(fs, &marked_pane);
usr.bin/tmux/cmd-find.c
1119
fs->flags |= CMD_FIND_EXACT_SESSION;
usr.bin/tmux/cmd-find.c
1123
fs->flags |= CMD_FIND_EXACT_WINDOW;
usr.bin/tmux/cmd-find.c
1163
if (cmd_find_get_session(fs, session) != 0)
usr.bin/tmux/cmd-find.c
1168
fs->wl = fs->s->curw;
usr.bin/tmux/cmd-find.c
1169
fs->idx = -1;
usr.bin/tmux/cmd-find.c
1170
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
1171
fs->wp = fs->w->active;
usr.bin/tmux/cmd-find.c
1178
if (cmd_find_get_window_with_session(fs, window) != 0)
usr.bin/tmux/cmd-find.c
1180
if (fs->wl != NULL) /* can be NULL if index only */
usr.bin/tmux/cmd-find.c
1181
fs->wp = fs->wl->window->active;
usr.bin/tmux/cmd-find.c
1188
if (cmd_find_get_pane_with_session(fs, pane) != 0)
usr.bin/tmux/cmd-find.c
1197
if (cmd_find_get_window_with_session(fs, window) != 0)
usr.bin/tmux/cmd-find.c
1200
if (cmd_find_get_pane_with_window(fs, pane) != 0)
usr.bin/tmux/cmd-find.c
1208
if (cmd_find_get_window(fs, window, window_only) != 0)
usr.bin/tmux/cmd-find.c
1211
if (cmd_find_get_pane_with_window(fs, pane) != 0)
usr.bin/tmux/cmd-find.c
1219
if (cmd_find_get_window(fs, window, window_only) != 0)
usr.bin/tmux/cmd-find.c
1221
if (fs->wl != NULL) /* can be NULL if index only */
usr.bin/tmux/cmd-find.c
1222
fs->wp = fs->wl->window->active;
usr.bin/tmux/cmd-find.c
1229
if (cmd_find_get_pane(fs, pane, pane_only) != 0)
usr.bin/tmux/cmd-find.c
1236
cmd_find_copy_state(fs, fs->current);
usr.bin/tmux/cmd-find.c
1238
fs->idx = -1;
usr.bin/tmux/cmd-find.c
1242
fs->current = NULL;
usr.bin/tmux/cmd-find.c
1251
fs->current = NULL;
usr.bin/tmux/cmd-find.c
1252
cmd_find_log_state(__func__, fs);
usr.bin/tmux/cmd-find.c
1280
struct cmd_find_state fs;
usr.bin/tmux/cmd-find.c
1289
cmd_find_clear_state(&fs, CMD_FIND_QUIET);
usr.bin/tmux/cmd-find.c
1290
fs.w = wp->window;
usr.bin/tmux/cmd-find.c
1291
if (cmd_find_best_session_with_window(&fs) == 0)
usr.bin/tmux/cmd-find.c
1292
found = cmd_find_best_client(fs.s);
usr.bin/tmux/cmd-find.c
193
cmd_find_best_session_with_window(struct cmd_find_state *fs)
usr.bin/tmux/cmd-find.c
199
log_debug("%s: window is @%u", __func__, fs->w->id);
usr.bin/tmux/cmd-find.c
203
if (!session_has(s, fs->w))
usr.bin/tmux/cmd-find.c
210
fs->s = cmd_find_best_session(slist, ssize, fs->flags);
usr.bin/tmux/cmd-find.c
211
if (fs->s == NULL)
usr.bin/tmux/cmd-find.c
214
return (cmd_find_best_winlink_with_window(fs));
usr.bin/tmux/cmd-find.c
226
cmd_find_best_winlink_with_window(struct cmd_find_state *fs)
usr.bin/tmux/cmd-find.c
230
log_debug("%s: window is @%u", __func__, fs->w->id);
usr.bin/tmux/cmd-find.c
233
if (fs->s->curw != NULL && fs->s->curw->window == fs->w)
usr.bin/tmux/cmd-find.c
234
wl = fs->s->curw;
usr.bin/tmux/cmd-find.c
236
RB_FOREACH(wl_loop, winlinks, &fs->s->windows) {
usr.bin/tmux/cmd-find.c
237
if (wl_loop->window == fs->w) {
usr.bin/tmux/cmd-find.c
245
fs->wl = wl;
usr.bin/tmux/cmd-find.c
246
fs->idx = fs->wl->idx;
usr.bin/tmux/cmd-find.c
265
cmd_find_get_session(struct cmd_find_state *fs, const char *session)
usr.bin/tmux/cmd-find.c
274
fs->s = session_find_by_id_str(session);
usr.bin/tmux/cmd-find.c
275
if (fs->s == NULL)
usr.bin/tmux/cmd-find.c
281
fs->s = session_find(session);
usr.bin/tmux/cmd-find.c
282
if (fs->s != NULL)
usr.bin/tmux/cmd-find.c
288
fs->s = c->session;
usr.bin/tmux/cmd-find.c
293
if (fs->flags & CMD_FIND_EXACT_SESSION)
usr.bin/tmux/cmd-find.c
306
fs->s = s;
usr.bin/tmux/cmd-find.c
320
fs->s = s;
usr.bin/tmux/cmd-find.c
329
cmd_find_get_window(struct cmd_find_state *fs, const char *window, int only)
usr.bin/tmux/cmd-find.c
335
fs->w = window_find_by_id_str(window);
usr.bin/tmux/cmd-find.c
336
if (fs->w == NULL)
usr.bin/tmux/cmd-find.c
338
return (cmd_find_best_session_with_window(fs));
usr.bin/tmux/cmd-find.c
342
fs->s = fs->current->s;
usr.bin/tmux/cmd-find.c
345
if (cmd_find_get_window_with_session(fs, window) == 0)
usr.bin/tmux/cmd-find.c
349
if (!only && cmd_find_get_session(fs, window) == 0) {
usr.bin/tmux/cmd-find.c
350
fs->wl = fs->s->curw;
usr.bin/tmux/cmd-find.c
351
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
352
if (~fs->flags & CMD_FIND_WINDOW_INDEX)
usr.bin/tmux/cmd-find.c
353
fs->idx = fs->wl->idx;
usr.bin/tmux/cmd-find.c
365
cmd_find_get_window_with_session(struct cmd_find_state *fs, const char *window)
usr.bin/tmux/cmd-find.c
373
exact = (fs->flags & CMD_FIND_EXACT_WINDOW);
usr.bin/tmux/cmd-find.c
379
fs->wl = fs->s->curw;
usr.bin/tmux/cmd-find.c
380
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
384
fs->w = window_find_by_id_str(window);
usr.bin/tmux/cmd-find.c
385
if (fs->w == NULL || !session_has(fs->s, fs->w))
usr.bin/tmux/cmd-find.c
387
return (cmd_find_best_winlink_with_window(fs));
usr.bin/tmux/cmd-find.c
396
s = fs->s;
usr.bin/tmux/cmd-find.c
397
if (fs->flags & CMD_FIND_WINDOW_INDEX) {
usr.bin/tmux/cmd-find.c
401
fs->idx = s->curw->idx + n;
usr.bin/tmux/cmd-find.c
405
fs->idx = s->curw->idx - n;
usr.bin/tmux/cmd-find.c
410
fs->wl = winlink_next_by_number(s->curw, s, n);
usr.bin/tmux/cmd-find.c
412
fs->wl = winlink_previous_by_number(s->curw, s, n);
usr.bin/tmux/cmd-find.c
413
if (fs->wl != NULL) {
usr.bin/tmux/cmd-find.c
414
fs->idx = fs->wl->idx;
usr.bin/tmux/cmd-find.c
415
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
423
fs->wl = TAILQ_FIRST(&fs->s->lastw);
usr.bin/tmux/cmd-find.c
424
if (fs->wl == NULL)
usr.bin/tmux/cmd-find.c
426
fs->idx = fs->wl->idx;
usr.bin/tmux/cmd-find.c
427
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
430
fs->wl = RB_MIN(winlinks, &fs->s->windows);
usr.bin/tmux/cmd-find.c
431
if (fs->wl == NULL)
usr.bin/tmux/cmd-find.c
433
fs->idx = fs->wl->idx;
usr.bin/tmux/cmd-find.c
434
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
437
fs->wl = RB_MAX(winlinks, &fs->s->windows);
usr.bin/tmux/cmd-find.c
438
if (fs->wl == NULL)
usr.bin/tmux/cmd-find.c
440
fs->idx = fs->wl->idx;
usr.bin/tmux/cmd-find.c
441
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
450
fs->wl = winlink_find_by_index(&fs->s->windows, idx);
usr.bin/tmux/cmd-find.c
451
if (fs->wl != NULL) {
usr.bin/tmux/cmd-find.c
452
fs->idx = fs->wl->idx;
usr.bin/tmux/cmd-find.c
453
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
456
if (fs->flags & CMD_FIND_WINDOW_INDEX) {
usr.bin/tmux/cmd-find.c
457
fs->idx = idx;
usr.bin/tmux/cmd-find.c
464
fs->wl = NULL;
usr.bin/tmux/cmd-find.c
465
RB_FOREACH(wl, winlinks, &fs->s->windows) {
usr.bin/tmux/cmd-find.c
467
if (fs->wl != NULL)
usr.bin/tmux/cmd-find.c
469
fs->wl = wl;
usr.bin/tmux/cmd-find.c
472
if (fs->wl != NULL) {
usr.bin/tmux/cmd-find.c
473
fs->idx = fs->wl->idx;
usr.bin/tmux/cmd-find.c
474
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
483
fs->wl = NULL;
usr.bin/tmux/cmd-find.c
484
RB_FOREACH(wl, winlinks, &fs->s->windows) {
usr.bin/tmux/cmd-find.c
486
if (fs->wl != NULL)
usr.bin/tmux/cmd-find.c
488
fs->wl = wl;
usr.bin/tmux/cmd-find.c
491
if (fs->wl != NULL) {
usr.bin/tmux/cmd-find.c
492
fs->idx = fs->wl->idx;
usr.bin/tmux/cmd-find.c
493
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
498
fs->wl = NULL;
usr.bin/tmux/cmd-find.c
499
RB_FOREACH(wl, winlinks, &fs->s->windows) {
usr.bin/tmux/cmd-find.c
501
if (fs->wl != NULL)
usr.bin/tmux/cmd-find.c
503
fs->wl = wl;
usr.bin/tmux/cmd-find.c
506
if (fs->wl != NULL) {
usr.bin/tmux/cmd-find.c
507
fs->idx = fs->wl->idx;
usr.bin/tmux/cmd-find.c
508
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
517
cmd_find_get_pane(struct cmd_find_state *fs, const char *pane, int only)
usr.bin/tmux/cmd-find.c
523
fs->wp = window_pane_find_by_id_str(pane);
usr.bin/tmux/cmd-find.c
524
if (fs->wp == NULL)
usr.bin/tmux/cmd-find.c
526
fs->w = fs->wp->window;
usr.bin/tmux/cmd-find.c
527
return (cmd_find_best_session_with_window(fs));
usr.bin/tmux/cmd-find.c
531
fs->s = fs->current->s;
usr.bin/tmux/cmd-find.c
532
fs->wl = fs->current->wl;
usr.bin/tmux/cmd-find.c
533
fs->idx = fs->current->idx;
usr.bin/tmux/cmd-find.c
534
fs->w = fs->current->w;
usr.bin/tmux/cmd-find.c
537
if (cmd_find_get_pane_with_window(fs, pane) == 0)
usr.bin/tmux/cmd-find.c
541
if (!only && cmd_find_get_window(fs, pane, 0) == 0) {
usr.bin/tmux/cmd-find.c
542
fs->wp = fs->w->active;
usr.bin/tmux/cmd-find.c
554
cmd_find_get_pane_with_session(struct cmd_find_state *fs, const char *pane)
usr.bin/tmux/cmd-find.c
560
fs->wp = window_pane_find_by_id_str(pane);
usr.bin/tmux/cmd-find.c
561
if (fs->wp == NULL)
usr.bin/tmux/cmd-find.c
563
fs->w = fs->wp->window;
usr.bin/tmux/cmd-find.c
564
return (cmd_find_best_winlink_with_window(fs));
usr.bin/tmux/cmd-find.c
568
fs->wl = fs->s->curw;
usr.bin/tmux/cmd-find.c
569
fs->idx = fs->wl->idx;
usr.bin/tmux/cmd-find.c
570
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
573
return (cmd_find_get_pane_with_window(fs, pane));
usr.bin/tmux/cmd-find.c
581
cmd_find_get_pane_with_window(struct cmd_find_state *fs, const char *pane)
usr.bin/tmux/cmd-find.c
592
fs->wp = window_pane_find_by_id_str(pane);
usr.bin/tmux/cmd-find.c
593
if (fs->wp == NULL)
usr.bin/tmux/cmd-find.c
595
if (fs->wp->window != fs->w)
usr.bin/tmux/cmd-find.c
602
fs->wp = TAILQ_FIRST(&fs->w->last_panes);
usr.bin/tmux/cmd-find.c
603
if (fs->wp == NULL)
usr.bin/tmux/cmd-find.c
607
fs->wp = window_pane_find_up(fs->w->active);
usr.bin/tmux/cmd-find.c
608
if (fs->wp == NULL)
usr.bin/tmux/cmd-find.c
612
fs->wp = window_pane_find_down(fs->w->active);
usr.bin/tmux/cmd-find.c
613
if (fs->wp == NULL)
usr.bin/tmux/cmd-find.c
617
fs->wp = window_pane_find_left(fs->w->active);
usr.bin/tmux/cmd-find.c
618
if (fs->wp == NULL)
usr.bin/tmux/cmd-find.c
622
fs->wp = window_pane_find_right(fs->w->active);
usr.bin/tmux/cmd-find.c
623
if (fs->wp == NULL)
usr.bin/tmux/cmd-find.c
634
wp = fs->w->active;
usr.bin/tmux/cmd-find.c
636
fs->wp = window_pane_next_by_number(fs->w, wp, n);
usr.bin/tmux/cmd-find.c
638
fs->wp = window_pane_previous_by_number(fs->w, wp, n);
usr.bin/tmux/cmd-find.c
639
if (fs->wp != NULL)
usr.bin/tmux/cmd-find.c
646
fs->wp = window_pane_at_index(fs->w, idx);
usr.bin/tmux/cmd-find.c
647
if (fs->wp != NULL)
usr.bin/tmux/cmd-find.c
652
fs->wp = window_find_string(fs->w, pane);
usr.bin/tmux/cmd-find.c
653
if (fs->wp != NULL)
usr.bin/tmux/cmd-find.c
661
cmd_find_clear_state(struct cmd_find_state *fs, int flags)
usr.bin/tmux/cmd-find.c
663
memset(fs, 0, sizeof *fs);
usr.bin/tmux/cmd-find.c
665
fs->flags = flags;
usr.bin/tmux/cmd-find.c
667
fs->idx = -1;
usr.bin/tmux/cmd-find.c
672
cmd_find_empty_state(struct cmd_find_state *fs)
usr.bin/tmux/cmd-find.c
674
if (fs->s == NULL && fs->wl == NULL && fs->w == NULL && fs->wp == NULL)
usr.bin/tmux/cmd-find.c
681
cmd_find_valid_state(struct cmd_find_state *fs)
usr.bin/tmux/cmd-find.c
685
if (fs->s == NULL || fs->wl == NULL || fs->w == NULL || fs->wp == NULL)
usr.bin/tmux/cmd-find.c
688
if (!session_alive(fs->s))
usr.bin/tmux/cmd-find.c
691
RB_FOREACH(wl, winlinks, &fs->s->windows) {
usr.bin/tmux/cmd-find.c
692
if (wl->window == fs->w && wl == fs->wl)
usr.bin/tmux/cmd-find.c
698
if (fs->w != fs->wl->window)
usr.bin/tmux/cmd-find.c
701
return (window_has_pane(fs->w, fs->wp));
usr.bin/tmux/cmd-find.c
717
cmd_find_log_state(const char *prefix, struct cmd_find_state *fs)
usr.bin/tmux/cmd-find.c
719
if (fs->s != NULL)
usr.bin/tmux/cmd-find.c
720
log_debug("%s: s=$%u %s", prefix, fs->s->id, fs->s->name);
usr.bin/tmux/cmd-find.c
723
if (fs->wl != NULL) {
usr.bin/tmux/cmd-find.c
724
log_debug("%s: wl=%u %d w=@%u %s", prefix, fs->wl->idx,
usr.bin/tmux/cmd-find.c
725
fs->wl->window == fs->w, fs->w->id, fs->w->name);
usr.bin/tmux/cmd-find.c
728
if (fs->wp != NULL)
usr.bin/tmux/cmd-find.c
729
log_debug("%s: wp=%%%u", prefix, fs->wp->id);
usr.bin/tmux/cmd-find.c
732
if (fs->idx != -1)
usr.bin/tmux/cmd-find.c
733
log_debug("%s: idx=%d", prefix, fs->idx);
usr.bin/tmux/cmd-find.c
740
cmd_find_from_session(struct cmd_find_state *fs, struct session *s, int flags)
usr.bin/tmux/cmd-find.c
742
cmd_find_clear_state(fs, flags);
usr.bin/tmux/cmd-find.c
744
fs->s = s;
usr.bin/tmux/cmd-find.c
745
fs->wl = fs->s->curw;
usr.bin/tmux/cmd-find.c
746
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
747
fs->wp = fs->w->active;
usr.bin/tmux/cmd-find.c
749
cmd_find_log_state(__func__, fs);
usr.bin/tmux/cmd-find.c
754
cmd_find_from_winlink(struct cmd_find_state *fs, struct winlink *wl, int flags)
usr.bin/tmux/cmd-find.c
756
cmd_find_clear_state(fs, flags);
usr.bin/tmux/cmd-find.c
758
fs->s = wl->session;
usr.bin/tmux/cmd-find.c
759
fs->wl = wl;
usr.bin/tmux/cmd-find.c
760
fs->w = wl->window;
usr.bin/tmux/cmd-find.c
761
fs->wp = wl->window->active;
usr.bin/tmux/cmd-find.c
763
cmd_find_log_state(__func__, fs);
usr.bin/tmux/cmd-find.c
768
cmd_find_from_session_window(struct cmd_find_state *fs, struct session *s,
usr.bin/tmux/cmd-find.c
771
cmd_find_clear_state(fs, flags);
usr.bin/tmux/cmd-find.c
773
fs->s = s;
usr.bin/tmux/cmd-find.c
774
fs->w = w;
usr.bin/tmux/cmd-find.c
775
if (cmd_find_best_winlink_with_window(fs) != 0) {
usr.bin/tmux/cmd-find.c
776
cmd_find_clear_state(fs, flags);
usr.bin/tmux/cmd-find.c
779
fs->wp = fs->w->active;
usr.bin/tmux/cmd-find.c
781
cmd_find_log_state(__func__, fs);
usr.bin/tmux/cmd-find.c
787
cmd_find_from_window(struct cmd_find_state *fs, struct window *w, int flags)
usr.bin/tmux/cmd-find.c
789
cmd_find_clear_state(fs, flags);
usr.bin/tmux/cmd-find.c
791
fs->w = w;
usr.bin/tmux/cmd-find.c
792
if (cmd_find_best_session_with_window(fs) != 0) {
usr.bin/tmux/cmd-find.c
793
cmd_find_clear_state(fs, flags);
usr.bin/tmux/cmd-find.c
796
if (cmd_find_best_winlink_with_window(fs) != 0) {
usr.bin/tmux/cmd-find.c
797
cmd_find_clear_state(fs, flags);
usr.bin/tmux/cmd-find.c
800
fs->wp = fs->w->active;
usr.bin/tmux/cmd-find.c
802
cmd_find_log_state(__func__, fs);
usr.bin/tmux/cmd-find.c
808
cmd_find_from_winlink_pane(struct cmd_find_state *fs, struct winlink *wl,
usr.bin/tmux/cmd-find.c
811
cmd_find_clear_state(fs, flags);
usr.bin/tmux/cmd-find.c
813
fs->s = wl->session;
usr.bin/tmux/cmd-find.c
814
fs->wl = wl;
usr.bin/tmux/cmd-find.c
815
fs->idx = fs->wl->idx;
usr.bin/tmux/cmd-find.c
816
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
817
fs->wp = wp;
usr.bin/tmux/cmd-find.c
819
cmd_find_log_state(__func__, fs);
usr.bin/tmux/cmd-find.c
824
cmd_find_from_pane(struct cmd_find_state *fs, struct window_pane *wp, int flags)
usr.bin/tmux/cmd-find.c
826
if (cmd_find_from_window(fs, wp->window, flags) != 0)
usr.bin/tmux/cmd-find.c
828
fs->wp = wp;
usr.bin/tmux/cmd-find.c
830
cmd_find_log_state(__func__, fs);
usr.bin/tmux/cmd-find.c
836
cmd_find_from_nothing(struct cmd_find_state *fs, int flags)
usr.bin/tmux/cmd-find.c
838
cmd_find_clear_state(fs, flags);
usr.bin/tmux/cmd-find.c
840
fs->s = cmd_find_best_session(NULL, 0, flags);
usr.bin/tmux/cmd-find.c
841
if (fs->s == NULL) {
usr.bin/tmux/cmd-find.c
842
cmd_find_clear_state(fs, flags);
usr.bin/tmux/cmd-find.c
845
fs->wl = fs->s->curw;
usr.bin/tmux/cmd-find.c
846
fs->idx = fs->wl->idx;
usr.bin/tmux/cmd-find.c
847
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
848
fs->wp = fs->w->active;
usr.bin/tmux/cmd-find.c
850
cmd_find_log_state(__func__, fs);
usr.bin/tmux/cmd-find.c
856
cmd_find_from_mouse(struct cmd_find_state *fs, struct mouse_event *m, int flags)
usr.bin/tmux/cmd-find.c
858
cmd_find_clear_state(fs, flags);
usr.bin/tmux/cmd-find.c
863
fs->wp = cmd_mouse_pane(m, &fs->s, &fs->wl);
usr.bin/tmux/cmd-find.c
864
if (fs->wp == NULL) {
usr.bin/tmux/cmd-find.c
865
cmd_find_clear_state(fs, flags);
usr.bin/tmux/cmd-find.c
868
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
870
cmd_find_log_state(__func__, fs);
usr.bin/tmux/cmd-find.c
876
cmd_find_from_client(struct cmd_find_state *fs, struct client *c, int flags)
usr.bin/tmux/cmd-find.c
882
return (cmd_find_from_nothing(fs, flags));
usr.bin/tmux/cmd-find.c
886
cmd_find_clear_state(fs, flags);
usr.bin/tmux/cmd-find.c
888
fs->wp = c->session->curw->window->active;
usr.bin/tmux/cmd-find.c
889
if (fs->wp == NULL) {
usr.bin/tmux/cmd-find.c
890
cmd_find_from_session(fs, c->session, flags);
usr.bin/tmux/cmd-find.c
893
fs->s = c->session;
usr.bin/tmux/cmd-find.c
894
fs->wl = fs->s->curw;
usr.bin/tmux/cmd-find.c
895
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
897
cmd_find_log_state(__func__, fs);
usr.bin/tmux/cmd-find.c
900
cmd_find_clear_state(fs, flags);
usr.bin/tmux/cmd-find.c
914
fs->w = wp->window;
usr.bin/tmux/cmd-find.c
915
if (cmd_find_best_session_with_window(fs) != 0) {
usr.bin/tmux/cmd-find.c
923
fs->wl = fs->s->curw;
usr.bin/tmux/cmd-find.c
924
fs->w = fs->wl->window;
usr.bin/tmux/cmd-find.c
925
fs->wp = fs->w->active; /* use active pane */
usr.bin/tmux/cmd-find.c
927
cmd_find_log_state(__func__, fs);
usr.bin/tmux/cmd-find.c
932
return (cmd_find_from_nothing(fs, flags));
usr.bin/tmux/cmd-find.c
940
cmd_find_target(struct cmd_find_state *fs, struct cmdq_item *item,
usr.bin/tmux/cmd-find.c
986
cmd_find_clear_state(fs, flags);
usr.bin/tmux/cmd-find.c
990
fs->current = &marked_pane;
usr.bin/tmux/cmd-find.c
993
fs->current = cmdq_get_current(item);
usr.bin/tmux/cmd-find.c
997
fs->current = &current;
usr.bin/tmux/cmd-new-session.c
361
cmd_find_from_session(&fs, s, 0);
usr.bin/tmux/cmd-new-session.c
362
cmdq_insert_hook(s, item, &fs, "after-new-session");
usr.bin/tmux/cmd-new-session.c
86
struct cmd_find_state fs;
usr.bin/tmux/cmd-new-window.c
171
cmd_find_from_winlink(&fs, new_wl, 0);
usr.bin/tmux/cmd-new-window.c
172
cmdq_insert_hook(s, item, &fs, "after-new-window");
usr.bin/tmux/cmd-new-window.c
66
struct cmd_find_state fs;
usr.bin/tmux/cmd-parse.y
204
struct cmd_find_state fs;
usr.bin/tmux/cmd-parse.y
207
if (cmd_find_valid_state(&pi->fs))
usr.bin/tmux/cmd-parse.y
208
fsp = &pi->fs;
usr.bin/tmux/cmd-parse.y
210
cmd_find_from_client(&fs, c, 0);
usr.bin/tmux/cmd-parse.y
211
fsp = &fs;
usr.bin/tmux/cmd-queue.c
515
cmdq_find_flag(struct cmdq_item *item, struct cmd_find_state *fs,
usr.bin/tmux/cmd-queue.c
521
cmd_find_from_client(fs, item->target_client, 0);
usr.bin/tmux/cmd-queue.c
526
if (cmd_find_target(fs, item, value, flag->type, flag->flags) != 0) {
usr.bin/tmux/cmd-queue.c
527
cmd_find_clear_state(fs, 0);
usr.bin/tmux/cmd-queue.c
580
struct cmd_find_state *fsp, fs;
usr.bin/tmux/cmd-queue.c
632
else if (cmd_find_from_client(&fs, item->client, 0) == 0)
usr.bin/tmux/cmd-queue.c
633
fsp = &fs;
usr.bin/tmux/cmd-queue.c
647
else if (cmd_find_from_client(&fs, item->client, 0) == 0)
usr.bin/tmux/cmd-queue.c
648
fsp = &fs;
usr.bin/tmux/cmd-rename-session.c
53
struct cmd_find_state fs;
usr.bin/tmux/cmd-rename-session.c
75
cmd_find_from_session(&fs, s, 0);
usr.bin/tmux/cmd-rename-session.c
76
event_payload_set_target(ep, &fs);
usr.bin/tmux/cmd-run-shell.c
83
struct cmd_find_state fs;
usr.bin/tmux/cmd-run-shell.c
95
if (wp == NULL && cmd_find_from_nothing(&fs, 0) == 0)
usr.bin/tmux/cmd-run-shell.c
96
wp = fs.wp;
usr.bin/tmux/cmd-select-pane.c
107
cmd_find_from_pane(&fs, mwp, 0);
usr.bin/tmux/cmd-select-pane.c
109
cmd_find_from_pane(&fs, lwp, 0);
usr.bin/tmux/cmd-select-pane.c
111
cmd_find_from_pane(&fs, wp, 0);
usr.bin/tmux/cmd-select-pane.c
112
event_payload_set_target(ep, &fs);
usr.bin/tmux/cmd-select-pane.c
154
struct cmd_find_state fs;
usr.bin/tmux/cmd-select-pane.c
256
cmd_find_from_pane(&fs, wp, 0);
usr.bin/tmux/cmd-select-pane.c
257
event_payload_set_target(ep, &fs);
usr.bin/tmux/cmd-select-pane.c
89
struct cmd_find_state fs;
usr.bin/tmux/cmd-set-option.c
138
struct cmd_find_state *target = cmdq_get_target(item), fs;
usr.bin/tmux/cmd-set-option.c
178
cmd_find_copy_state(&fs, target);
usr.bin/tmux/cmd-set-option.c
209
hooks_monitor_add(item, oo, name, type, id, format, flags, &fs, s);
usr.bin/tmux/cmd-split-window.c
251
cmd_find_from_pane(&fs, new_wp, 0);
usr.bin/tmux/cmd-split-window.c
252
event_payload_set_target(ep, &fs);
usr.bin/tmux/cmd-split-window.c
294
cmd_find_from_winlink_pane(&fs, wl, new_wp, 0);
usr.bin/tmux/cmd-split-window.c
295
cmdq_insert_hook(s, item, &fs, "after-split-window");
usr.bin/tmux/cmd-split-window.c
90
struct cmd_find_state fs;
usr.bin/tmux/events-payload.c
175
event_payload_set_target(struct event_payload *ep, struct cmd_find_state *fs)
usr.bin/tmux/events-payload.c
181
if (fs->s != NULL) {
usr.bin/tmux/events-payload.c
182
session_add_ref(fs->s, __func__);
usr.bin/tmux/events-payload.c
183
target->s = fs->s;
usr.bin/tmux/events-payload.c
185
if (fs->wl != NULL) {
usr.bin/tmux/events-payload.c
186
target->idx = fs->wl->idx;
usr.bin/tmux/events-payload.c
188
session_add_ref(fs->wl->session, __func__);
usr.bin/tmux/events-payload.c
189
target->s = fs->wl->session;
usr.bin/tmux/events-payload.c
193
if (fs->w != NULL) {
usr.bin/tmux/events-payload.c
194
window_add_ref(fs->w, __func__);
usr.bin/tmux/events-payload.c
195
target->w = fs->w;
usr.bin/tmux/events-payload.c
196
} else if (fs->wl != NULL) {
usr.bin/tmux/events-payload.c
197
window_add_ref(fs->wl->window, __func__);
usr.bin/tmux/events-payload.c
198
target->w = fs->wl->window;
usr.bin/tmux/events-payload.c
200
if (fs->wp != NULL) {
usr.bin/tmux/events-payload.c
201
window_pane_add_ref(fs->wp, __func__);
usr.bin/tmux/events-payload.c
202
target->wp = fs->wp;
usr.bin/tmux/events-payload.c
208
event_payload_get_target(struct event_payload *ep, struct cmd_find_state *fs)
usr.bin/tmux/events-payload.c
212
int flags = fs->flags;
usr.bin/tmux/events-payload.c
223
cmd_find_clear_state(fs, flags);
usr.bin/tmux/events-payload.c
224
fs->s = t->s;
usr.bin/tmux/events-payload.c
225
fs->w = t->w;
usr.bin/tmux/events-payload.c
226
fs->wp = t->wp;
usr.bin/tmux/events-payload.c
227
fs->wl = wl;
usr.bin/tmux/events-payload.c
228
fs->idx = (wl != NULL ? wl->idx : -1);
usr.bin/tmux/events-payload.c
229
if (cmd_find_valid_state(fs))
usr.bin/tmux/events-payload.c
235
cmd_find_from_winlink_pane(fs, wl, t->wp, flags);
usr.bin/tmux/events-payload.c
236
if (cmd_find_valid_state(fs))
usr.bin/tmux/events-payload.c
241
cmd_find_from_pane(fs, t->wp, flags) == 0 &&
usr.bin/tmux/events-payload.c
242
cmd_find_valid_state(fs))
usr.bin/tmux/events-payload.c
246
cmd_find_from_winlink(fs, wl, flags);
usr.bin/tmux/events-payload.c
247
if (cmd_find_valid_state(fs))
usr.bin/tmux/events-payload.c
254
cmd_find_from_session_window(fs, t->s, t->w, flags) == 0 &&
usr.bin/tmux/events-payload.c
255
cmd_find_valid_state(fs))
usr.bin/tmux/events-payload.c
259
cmd_find_from_session(fs, t->s, flags);
usr.bin/tmux/events-payload.c
260
if (cmd_find_valid_state(fs))
usr.bin/tmux/events-payload.c
264
if (cmd_find_from_nothing(fs, flags) == 0)
usr.bin/tmux/events-payload.c
267
cmd_find_clear_state(fs, flags);
usr.bin/tmux/events.c
121
struct cmd_find_state fs;
usr.bin/tmux/events.c
124
cmd_find_from_client(&fs, c, 0);
usr.bin/tmux/events.c
125
event_payload_set_target(ep, &fs);
usr.bin/tmux/events.c
127
if (fs.s != NULL)
usr.bin/tmux/events.c
128
event_payload_set_session(ep, "session", fs.s);
usr.bin/tmux/events.c
129
if (fs.w != NULL)
usr.bin/tmux/events.c
130
event_payload_set_window(ep, "window", fs.w);
usr.bin/tmux/events.c
131
if (fs.wl != NULL)
usr.bin/tmux/events.c
132
event_payload_set_int(ep, "window_index", fs.wl->idx);
usr.bin/tmux/events.c
133
else if (fs.idx != -1)
usr.bin/tmux/events.c
134
event_payload_set_int(ep, "window_index", fs.idx);
usr.bin/tmux/events.c
135
if (fs.wp != NULL)
usr.bin/tmux/events.c
136
event_payload_set_pane(ep, "pane", fs.wp);
usr.bin/tmux/events.c
145
struct cmd_find_state fs;
usr.bin/tmux/events.c
149
cmd_find_from_session(&fs, s, 0);
usr.bin/tmux/events.c
150
event_payload_set_target(ep, &fs);
usr.bin/tmux/events.c
161
struct cmd_find_state fs;
usr.bin/tmux/events.c
164
cmd_find_from_window(&fs, w, 0);
usr.bin/tmux/events.c
165
event_payload_set_target(ep, &fs);
usr.bin/tmux/events.c
175
struct cmd_find_state fs;
usr.bin/tmux/events.c
178
cmd_find_from_pane(&fs, wp, 0);
usr.bin/tmux/events.c
179
event_payload_set_target(ep, &fs);
usr.bin/tmux/events.c
190
struct cmd_find_state fs;
usr.bin/tmux/events.c
193
cmd_find_from_winlink(&fs, wl, 0);
usr.bin/tmux/events.c
194
event_payload_set_target(ep, &fs);
usr.bin/tmux/format.c
6760
struct client *c, struct cmd_find_state *fs)
usr.bin/tmux/format.c
6762
return (format_single(item, fmt, c, fs->s, fs->wl, fs->wp));
usr.bin/tmux/format.c
6792
struct cmd_find_state *fs)
usr.bin/tmux/format.c
6794
return (format_create_defaults(item, c, fs->s, fs->wl, fs->wp));
usr.bin/tmux/hooks.c
107
struct cmd_find_state fs;
usr.bin/tmux/hooks.c
118
cmd_find_clear_state(&fs, 0);
usr.bin/tmux/hooks.c
119
if (cmd_find_empty_state(&hd->fs) || !cmd_find_valid_state(&hd->fs))
usr.bin/tmux/hooks.c
120
cmd_find_from_nothing(&fs, 0);
usr.bin/tmux/hooks.c
122
cmd_find_copy_state(&fs, &hd->fs);
usr.bin/tmux/hooks.c
128
if (fs.s == NULL)
usr.bin/tmux/hooks.c
131
oo = fs.s->options;
usr.bin/tmux/hooks.c
133
if (o == NULL && fs.wp != NULL) {
usr.bin/tmux/hooks.c
134
oo = fs.wp->options;
usr.bin/tmux/hooks.c
137
if (o == NULL && fs.wl != NULL) {
usr.bin/tmux/hooks.c
138
oo = fs.wl->window->options;
usr.bin/tmux/hooks.c
149
state = cmdq_new_state(&fs, NULL, CMDQ_STATE_NOHOOKS);
usr.bin/tmux/hooks.c
151
state = cmdq_new_state(&fs, cmdq_get_event(item),
usr.bin/tmux/hooks.c
158
pr = hooks_parse(hd, &fs, value);
usr.bin/tmux/hooks.c
174
pr = hooks_parse(hd, &fs, value);
usr.bin/tmux/hooks.c
219
cmd_find_clear_state(&hd.fs, 0);
usr.bin/tmux/hooks.c
220
event_payload_get_target(ep, &hd.fs);
usr.bin/tmux/hooks.c
313
cmd_find_copy_state(&hd.fs, target);
usr.bin/tmux/hooks.c
33
struct cmd_find_state fs;
usr.bin/tmux/hooks.c
373
struct cmd_find_state fs;
usr.bin/tmux/hooks.c
378
cmd_find_clear_state(&fs, 0);
usr.bin/tmux/hooks.c
380
cmd_find_from_winlink_pane(&fs, wl, wp, 0);
usr.bin/tmux/hooks.c
382
cmd_find_from_winlink(&fs, wl, 0);
usr.bin/tmux/hooks.c
384
cmd_find_from_pane(&fs, wp, 0);
usr.bin/tmux/hooks.c
386
cmd_find_from_session(&fs, change->s, 0);
usr.bin/tmux/hooks.c
388
cmd_find_copy_state(&fs, &hm->fs);
usr.bin/tmux/hooks.c
389
event_payload_set_target(ep, &fs);
usr.bin/tmux/hooks.c
423
int flags, struct cmd_find_state *fs, struct session *s)
usr.bin/tmux/hooks.c
43
struct cmd_find_state fs;
usr.bin/tmux/hooks.c
435
cmd_find_copy_state(&hm->fs, fs);
usr.bin/tmux/hooks.c
82
hooks_parse(struct hooks_data *hd, struct cmd_find_state *fs,
usr.bin/tmux/hooks.c
92
ft = format_create_defaults(NULL, hd->client, fs->s, fs->wl, fs->wp);
usr.bin/tmux/input.c
3191
struct cmd_find_state fs;
usr.bin/tmux/input.c
3196
cmd_find_from_pane(&fs, wp, 0);
usr.bin/tmux/input.c
3197
event_payload_set_target(ep, &fs);
usr.bin/tmux/input.c
3198
if (fs.s != NULL)
usr.bin/tmux/input.c
3199
event_payload_set_session(ep, "session", fs.s);
usr.bin/tmux/input.c
3200
if (fs.wl != NULL)
usr.bin/tmux/input.c
3201
event_payload_set_int(ep, "window_index", fs.wl->idx);
usr.bin/tmux/input.c
800
struct cmd_find_state fs;
usr.bin/tmux/input.c
803
cmd_find_from_pane(&fs, wp, 0);
usr.bin/tmux/input.c
804
event_payload_set_target(ep, &fs);
usr.bin/tmux/key-bindings.c
759
struct client *c, struct key_event *event, struct cmd_find_state *fs)
usr.bin/tmux/key-bindings.c
775
new_state = cmdq_new_state(fs, event, flags);
usr.bin/tmux/menu.c
133
if (fs != NULL)
usr.bin/tmux/menu.c
134
s = format_single_from_state(qitem, cmd, c, fs);
usr.bin/tmux/menu.c
186
ft = format_create_defaults(NULL, NULL, md->fs.s, md->fs.wl, md->fs.wp);
usr.bin/tmux/menu.c
39
struct cmd_find_state fs;
usr.bin/tmux/menu.c
528
state = cmdq_new_state(&md->fs, event, 0);
usr.bin/tmux/menu.c
56
struct cmdq_item *qitem, struct client *c, struct cmd_find_state *fs)
usr.bin/tmux/menu.c
575
const char *border_style, struct cmd_find_state *fs, menu_choice_cb cb,
usr.bin/tmux/menu.c
586
if (fs == NULL)
usr.bin/tmux/menu.c
589
w = fs->w;
usr.bin/tmux/menu.c
61
menu_add_item(menu, loop, qitem, c, fs);
usr.bin/tmux/menu.c
627
if (fs != NULL)
usr.bin/tmux/menu.c
628
cmd_find_copy_state(&md->fs, fs);
usr.bin/tmux/menu.c
629
else if (cmd_find_from_window(&md->fs, w, 0) != 0)
usr.bin/tmux/menu.c
630
cmd_find_clear_state(&md->fs, 0);
usr.bin/tmux/menu.c
66
struct cmdq_item *qitem, struct client *c, struct cmd_find_state *fs)
usr.bin/tmux/menu.c
89
if (fs != NULL)
usr.bin/tmux/menu.c
90
s = format_single_from_state(qitem, item->name, c, fs);
usr.bin/tmux/mode-tree.c
1815
mode_tree_run_command(struct client *c, struct cmd_find_state *fs,
usr.bin/tmux/mode-tree.c
1824
state = cmdq_new_state(fs, NULL, 0);
usr.bin/tmux/options.c
1015
const char *name, struct cmd_find_state *fs, struct options **oo,
usr.bin/tmux/options.c
1018
struct session *s = fs->s;
usr.bin/tmux/options.c
1019
struct winlink *wl = fs->wl;
usr.bin/tmux/options.c
1020
struct window_pane *wp = fs->wp;
usr.bin/tmux/options.c
1026
return (options_scope_from_flags(args, window, fs, oo, cause));
usr.bin/tmux/options.c
1086
struct cmd_find_state *fs, struct options **oo, char **cause)
usr.bin/tmux/options.c
1088
struct session *s = fs->s;
usr.bin/tmux/options.c
1089
struct winlink *wl = fs->wl;
usr.bin/tmux/options.c
1090
struct window_pane *wp = fs->wp;
usr.bin/tmux/prompt.c
170
if (pd->fs != NULL) {
usr.bin/tmux/prompt.c
171
ft = format_create_from_state(NULL, NULL, pd->fs);
usr.bin/tmux/prompt.c
172
cmd_find_copy_state(&pr->state, pd->fs);
usr.bin/tmux/resize.c
29
struct cmd_find_state fs;
usr.bin/tmux/resize.c
32
cmd_find_from_window(&fs, w, 0);
usr.bin/tmux/resize.c
33
event_payload_set_target(ep, &fs);
usr.bin/tmux/server-client.c
1413
struct cmd_find_state fs;
usr.bin/tmux/server-client.c
1458
if (!KEYC_IS_MOUSE(key) || cmd_find_from_mouse(&fs, m, 0) != 0)
usr.bin/tmux/server-client.c
1459
cmd_find_from_client(&fs, c, 0);
usr.bin/tmux/server-client.c
1460
wp = fs.wp;
usr.bin/tmux/server-client.c
1589
key_bindings_dispatch(bd, item, c, event, &fs);
usr.bin/tmux/server-client.c
400
struct cmd_find_state fs;
usr.bin/tmux/server-client.c
403
cmd_find_from_client(&fs, c, 0);
usr.bin/tmux/server-client.c
404
event_payload_set_target(ep, &fs);
usr.bin/tmux/server-client.c
406
if (fs.s != NULL) {
usr.bin/tmux/server-client.c
407
event_payload_set_session(ep, "session", fs.s);
usr.bin/tmux/server-client.c
408
event_payload_set_session(ep, "new_session", fs.s);
usr.bin/tmux/server-client.c
412
if (fs.w != NULL)
usr.bin/tmux/server-client.c
413
event_payload_set_window(ep, "window", fs.w);
usr.bin/tmux/server-client.c
414
if (fs.wl != NULL)
usr.bin/tmux/server-client.c
415
event_payload_set_int(ep, "window_index", fs.wl->idx);
usr.bin/tmux/server-client.c
416
else if (fs.idx != -1)
usr.bin/tmux/server-client.c
417
event_payload_set_int(ep, "window_index", fs.idx);
usr.bin/tmux/server-client.c
418
if (fs.wp != NULL)
usr.bin/tmux/server-client.c
419
event_payload_set_pane(ep, "pane", fs.wp);
usr.bin/tmux/server-client.c
428
struct cmd_find_state fs;
usr.bin/tmux/server-client.c
431
cmd_find_from_client(&fs, c, 0);
usr.bin/tmux/server-client.c
432
event_payload_set_target(ep, &fs);
usr.bin/tmux/server-client.c
434
if (fs.s != NULL)
usr.bin/tmux/server-client.c
435
event_payload_set_session(ep, "session", fs.s);
usr.bin/tmux/server-client.c
436
if (fs.w != NULL)
usr.bin/tmux/server-client.c
437
event_payload_set_window(ep, "window", fs.w);
usr.bin/tmux/server-client.c
438
if (fs.wl != NULL)
usr.bin/tmux/server-client.c
439
event_payload_set_int(ep, "window_index", fs.wl->idx);
usr.bin/tmux/server-client.c
440
else if (fs.idx != -1)
usr.bin/tmux/server-client.c
441
event_payload_set_int(ep, "window_index", fs.idx);
usr.bin/tmux/server-client.c
442
if (fs.wp != NULL)
usr.bin/tmux/server-client.c
443
event_payload_set_pane(ep, "pane", fs.wp);
usr.bin/tmux/server-client.c
857
struct session *s = c->session, *fs;
usr.bin/tmux/server-client.c
998
fs = session_find_by_id(sr->argument);
usr.bin/tmux/server-client.c
999
if (fs == NULL)
usr.bin/tmux/server-fn.c
39
struct cmd_find_state fs;
usr.bin/tmux/server-fn.c
47
cmd_find_from_pane(&fs, wp, 0);
usr.bin/tmux/server-fn.c
48
event_payload_set_target(ep, &fs);
usr.bin/tmux/session.c
482
struct cmd_find_state fs;
usr.bin/tmux/session.c
485
cmd_find_from_winlink(&fs, wl, 0);
usr.bin/tmux/session.c
486
event_payload_set_target(ep, &fs);
usr.bin/tmux/session.c
574
struct cmd_find_state fs;
usr.bin/tmux/session.c
578
cmd_find_from_session(&fs, s, 0);
usr.bin/tmux/session.c
579
event_payload_set_target(ep, &fs);
usr.bin/tmux/spawn.c
80
struct cmd_find_state fs;
usr.bin/tmux/spawn.c
85
cmd_find_from_winlink_pane(&fs, sc->wl, wp, 0);
usr.bin/tmux/spawn.c
86
event_payload_set_target(ep, &fs);
usr.bin/tmux/status.c
573
status_prompt_set(struct client *c, struct cmd_find_state *fs,
usr.bin/tmux/status.c
594
pd.fs = fs;
usr.bin/tmux/window-buffer.c
164
if (cmd_find_valid_state(&data->fs)) {
usr.bin/tmux/window-buffer.c
165
s = data->fs.s;
usr.bin/tmux/window-buffer.c
166
wl = data->fs.wl;
usr.bin/tmux/window-buffer.c
167
wp = data->fs.wp;
usr.bin/tmux/window-buffer.c
309
if (cmd_find_valid_state(&data->fs)) {
usr.bin/tmux/window-buffer.c
310
s = data->fs.s;
usr.bin/tmux/window-buffer.c
311
wl = data->fs.wl;
usr.bin/tmux/window-buffer.c
312
wp = data->fs.wp;
usr.bin/tmux/window-buffer.c
367
__unused struct cmdq_item *item, struct cmd_find_state *fs,
usr.bin/tmux/window-buffer.c
376
cmd_find_copy_state(&data->fs, fs);
usr.bin/tmux/window-buffer.c
88
struct cmd_find_state fs;
usr.bin/tmux/window-client.c
425
__unused struct cmdq_item *item, __unused struct cmd_find_state *fs,
usr.bin/tmux/window-clock.c
173
__unused struct cmdq_item *item, __unused struct cmd_find_state *fs,
usr.bin/tmux/window-copy.c
601
__unused struct cmdq_item *item, __unused struct cmd_find_state *fs,
usr.bin/tmux/window-copy.c
653
__unused struct cmdq_item *item, __unused struct cmd_find_state *fs,
usr.bin/tmux/window-customize.c
1011
text = window_customize_scope_text(scope, fs);
usr.bin/tmux/window-customize.c
1069
struct cmd_find_state fs;
usr.bin/tmux/window-customize.c
1080
if (cmd_find_valid_state(&data->fs))
usr.bin/tmux/window-customize.c
1081
cmd_find_copy_state(&fs, &data->fs);
usr.bin/tmux/window-customize.c
1083
cmd_find_from_pane(&fs, data->wp, 0);
usr.bin/tmux/window-customize.c
1085
ft = format_create_from_state(NULL, NULL, &fs);
usr.bin/tmux/window-customize.c
1095
ft, filter, &fs, WINDOW_CUSTOMIZE_OPTIONS);
usr.bin/tmux/window-customize.c
1099
WINDOW_CUSTOMIZE_SESSION, fs.s->options,
usr.bin/tmux/window-customize.c
1101
ft, filter, &fs, WINDOW_CUSTOMIZE_OPTIONS);
usr.bin/tmux/window-customize.c
1105
WINDOW_CUSTOMIZE_WINDOW, fs.w->options,
usr.bin/tmux/window-customize.c
1106
WINDOW_CUSTOMIZE_PANE, fs.wp->options,
usr.bin/tmux/window-customize.c
1107
ft, filter, &fs, WINDOW_CUSTOMIZE_OPTIONS);
usr.bin/tmux/window-customize.c
1111
WINDOW_CUSTOMIZE_SESSION, fs.s->options,
usr.bin/tmux/window-customize.c
1113
ft, filter, &fs, WINDOW_CUSTOMIZE_HOOKS);
usr.bin/tmux/window-customize.c
1117
WINDOW_CUSTOMIZE_WINDOW, fs.w->options,
usr.bin/tmux/window-customize.c
1118
WINDOW_CUSTOMIZE_PANE, fs.wp->options,
usr.bin/tmux/window-customize.c
1119
ft, filter, &fs, WINDOW_CUSTOMIZE_HOOKS);
usr.bin/tmux/window-customize.c
1123
&fs);
usr.bin/tmux/window-customize.c
1126
WINDOW_CUSTOMIZE_SESSION_ENVIRONMENT, fs.s->environ, ft, filter,
usr.bin/tmux/window-customize.c
1127
&fs);
usr.bin/tmux/window-customize.c
1130
ft = format_create_from_state(NULL, NULL, &fs);
usr.bin/tmux/window-customize.c
1136
window_customize_build_keys(data, kt, ft, filter, &fs);
usr.bin/tmux/window-customize.c
1219
struct cmd_find_state fs;
usr.bin/tmux/window-customize.c
1224
if (!window_customize_check_item(data, item, &fs))
usr.bin/tmux/window-customize.c
1242
ft = format_create_from_state(NULL, NULL, &fs);
usr.bin/tmux/window-customize.c
1435
"Window value (from window %u): ", fs.wl->idx);
usr.bin/tmux/window-customize.c
146
struct cmd_find_state fs;
usr.bin/tmux/window-customize.c
1467
struct cmd_find_state fs;
usr.bin/tmux/window-customize.c
1470
if (!window_customize_check_item(data, item, &fs))
usr.bin/tmux/window-customize.c
1595
__unused struct cmdq_item *item, struct cmd_find_state *fs,
usr.bin/tmux/window-customize.c
1606
memcpy(&data->fs, fs, sizeof data->fs);
usr.bin/tmux/window-customize.c
173
struct cmd_find_state *fs)
usr.bin/tmux/window-customize.c
1785
struct cmd_find_state fs;
usr.bin/tmux/window-customize.c
1789
if (item == NULL || !window_customize_check_item(data, item, &fs))
usr.bin/tmux/window-customize.c
1803
text = window_customize_scope_text(scope, &fs);
usr.bin/tmux/window-customize.c
184
return (fs->s->options);
usr.bin/tmux/window-customize.c
188
return (fs->w->options);
usr.bin/tmux/window-customize.c
190
return (fs->wp->options);
usr.bin/tmux/window-customize.c
200
struct cmd_find_state *fs)
usr.bin/tmux/window-customize.c
206
return (fs->s->environ);
usr.bin/tmux/window-customize.c
2133
struct cmd_find_state fs;
usr.bin/tmux/window-customize.c
2135
if (item == NULL || !window_customize_check_item(data, item, &fs))
usr.bin/tmux/window-customize.c
216
struct cmd_find_state fs;
usr.bin/tmux/window-customize.c
219
fsp = &fs;
usr.bin/tmux/window-customize.c
2200
oo = window_customize_get_tree(scope, &fs);
usr.bin/tmux/window-customize.c
221
if (cmd_find_valid_state(&data->fs))
usr.bin/tmux/window-customize.c
2214
text = window_customize_scope_text(scope, &fs);
usr.bin/tmux/window-customize.c
222
cmd_find_copy_state(fsp, &data->fs);
usr.bin/tmux/window-customize.c
255
struct cmd_find_state *fs)
usr.bin/tmux/window-customize.c
262
window_pane_index(fs->wp, &idx);
usr.bin/tmux/window-customize.c
267
xasprintf(&s, "session %s", fs->s->name);
usr.bin/tmux/window-customize.c
270
xasprintf(&s, "window %u", fs->wl->idx);
usr.bin/tmux/window-customize.c
2724
struct cmd_find_state fs;
usr.bin/tmux/window-customize.c
2728
if (cmd_find_valid_state(&data->fs))
usr.bin/tmux/window-customize.c
2729
cmd_find_copy_state(&fs, &data->fs);
usr.bin/tmux/window-customize.c
2731
cmd_find_from_pane(&fs, data->wp, 0);
usr.bin/tmux/window-customize.c
2740
fs.s->options, WINDOW_CUSTOMIZE_OPTIONS);
usr.bin/tmux/window-customize.c
2745
fs.wp->options, WINDOW_CUSTOMIZE_OPTIONS);
usr.bin/tmux/window-customize.c
2750
fs.s->options, WINDOW_CUSTOMIZE_HOOKS);
usr.bin/tmux/window-customize.c
2755
fs.wp->options, WINDOW_CUSTOMIZE_HOOKS);
usr.bin/tmux/window-customize.c
2765
WINDOW_CUSTOMIZE_SESSION_ENVIRONMENT, fs.s->environ);
usr.bin/tmux/window-customize.c
677
const char *filter, struct cmd_find_state *fs,
usr.bin/tmux/window-customize.c
725
text = window_customize_scope_text(scope, fs);
usr.bin/tmux/window-customize.c
814
struct format_tree *ft, const char *filter, struct cmd_find_state *fs,
usr.bin/tmux/window-customize.c
853
filter, fs, type);
usr.bin/tmux/window-customize.c
877
filter, fs, type);
usr.bin/tmux/window-customize.c
893
struct cmd_find_state *fs)
usr.bin/tmux/window-customize.c
908
ft = format_create_from_state(NULL, NULL, fs);
usr.bin/tmux/window-customize.c
990
struct cmd_find_state *fs)
usr.bin/tmux/window-panes.c
886
__unused struct cmd_find_state *fs, struct args *args)
usr.bin/tmux/window-switch.c
337
__unused struct cmdq_item *item, struct cmd_find_state *fs,
usr.bin/tmux/window-switch.c
364
prompt_set_options(&pd, fs->s);
usr.bin/tmux/window-switch.c
365
pd.fs = fs;
usr.bin/tmux/window-switch.c
433
struct cmd_find_state fs;
usr.bin/tmux/window-switch.c
445
cmd_find_clear_state(&fs, 0);
usr.bin/tmux/window-switch.c
451
cmd_find_from_session(&fs, s, 0);
usr.bin/tmux/window-switch.c
460
cmd_find_from_winlink(&fs, wl, 0);
usr.bin/tmux/window-switch.c
470
state = cmdq_new_state(&fs, NULL, 0);
usr.bin/tmux/window-tree.c
1102
__unused struct cmdq_item *item, struct cmd_find_state *fs,
usr.bin/tmux/window-tree.c
1119
memcpy(&data->fs, fs, sizeof data->fs);
usr.bin/tmux/window-tree.c
1205
struct cmd_find_state *fs)
usr.bin/tmux/window-tree.c
1235
cmd_find_clear_state(fs, 0);
usr.bin/tmux/window-tree.c
1237
cmd_find_from_winlink_pane(fs, wl, wp, 0);
usr.bin/tmux/window-tree.c
1248
struct cmd_find_state fs;
usr.bin/tmux/window-tree.c
1250
name = window_tree_get_target(item, &fs);
usr.bin/tmux/window-tree.c
1252
mode_tree_run_command(c, &fs, data->entered, name);
usr.bin/tmux/window-tree.c
126
struct cmd_find_state fs;
usr.bin/tmux/window-tree.c
1441
struct cmd_find_state fs, *fsp = &data->fs;
usr.bin/tmux/window-tree.c
1548
name = window_tree_get_target(item, &fs);
usr.bin/tmux/window-tree.c
439
current = session_group_contains(data->fs.s);
usr.bin/tmux/window-tree.c
453
if ((sg == current && s != data->fs.s) ||
usr.bin/tmux/window-tree.c
464
*tag = (uint64_t)data->fs.s;
usr.bin/tmux/window-tree.c
467
*tag = (uint64_t)data->fs.wl;
usr.bin/tmux/window-tree.c
470
if (window_count_panes(data->fs.wl->window, 1) == 1)
usr.bin/tmux/window-tree.c
471
*tag = (uint64_t)data->fs.wl;
usr.bin/tmux/window-tree.c
473
*tag = (uint64_t)data->fs.wp;
usr.bin/tmux/window.c
104
struct cmd_find_state fs;
usr.bin/tmux/window.c
107
cmd_find_from_window(&fs, w, 0);
usr.bin/tmux/window.c
108
event_payload_set_target(ep, &fs);
usr.bin/tmux/window.c
120
struct cmd_find_state fs;
usr.bin/tmux/window.c
123
cmd_find_from_pane(&fs, wp, 0);
usr.bin/tmux/window.c
124
event_payload_set_target(ep, &fs);
usr.bin/tmux/window.c
138
struct cmd_find_state fs;
usr.bin/tmux/window.c
141
cmd_find_from_pane(&fs, wp, 0);
usr.bin/tmux/window.c
142
event_payload_set_target(ep, &fs);
usr.bin/tmux/window.c
1555
struct cmd_find_state fs;
usr.bin/tmux/window.c
1580
cmd_find_from_pane(&fs, wp, 0);
usr.bin/tmux/window.c
1581
event_payload_set_target(ep, &fs);
usr.bin/tmux/window.c
1594
struct cmd_find_state *fs, struct args *args)
usr.bin/tmux/window.c
161
struct cmd_find_state fs;
usr.bin/tmux/window.c
1623
wme->screen = wme->mode->init(wme, item, fs, args);
usr.bin/tmux/window.c
164
cmd_find_from_pane(&fs, wp, 0);
usr.bin/tmux/window.c
165
event_payload_set_target(ep, &fs);
usr.bin/tmux/window.c
1727
struct cmd_find_state *fs, const char *msg, const char *input,
usr.bin/tmux/window.c
1750
pd.fs = fs;
usr.bin/tmux/window.c
183
struct cmd_find_state fs;
usr.bin/tmux/window.c
187
cmd_find_from_pane(&fs, wp, 0);
usr.bin/tmux/window.c
188
event_payload_set_target(ep, &fs);
usr.sbin/acme-client/chngproc.c
101
pp = reallocarray(fs, (fsz + 1), sizeof(char *));
usr.sbin/acme-client/chngproc.c
106
fs = pp;
usr.sbin/acme-client/chngproc.c
107
if (asprintf(&fs[fsz], "%s/%s", root, tok) == -1) {
usr.sbin/acme-client/chngproc.c
120
fd = open(fs[fsz - 1], O_WRONLY|O_CREAT|O_TRUNC, 0444);
usr.sbin/acme-client/chngproc.c
122
warn("%s", fs[fsz - 1]);
usr.sbin/acme-client/chngproc.c
126
warn("%s", fs[fsz - 1]);
usr.sbin/acme-client/chngproc.c
130
warn("%s", fs[fsz - 1]);
usr.sbin/acme-client/chngproc.c
139
dodbg("%s: created", fs[fsz - 1]);
usr.sbin/acme-client/chngproc.c
159
if (unlink(fs[i]) == -1 && errno != ENOENT)
usr.sbin/acme-client/chngproc.c
160
warn("%s", fs[i]);
usr.sbin/acme-client/chngproc.c
161
free(fs[i]);
usr.sbin/acme-client/chngproc.c
163
free(fs);
usr.sbin/acme-client/chngproc.c
33
char *tok = NULL, *th = NULL, *fmt = NULL, **fs = NULL;
usr.sbin/amd/amd/am_ops.c
101
char *fs = strchr(host, ':');
usr.sbin/amd/amd/am_ops.c
102
char *sublink = fs ? strchr(fs+1, ':') : 0;
usr.sbin/amd/amd/am_ops.c
107
fs ? fs+1 : "",
usr.sbin/amd/amd/host_ops.c
488
host_exec(char *op, char *host, char *fs, char *opts)
usr.sbin/amd/amd/host_ops.c
500
argv[4] = fs;
usr.sbin/amd/amd/map.c
621
map_flush_srvr(fserver *fs)
usr.sbin/amd/amd/map.c
628
if (mp && mp->am_mnt && mp->am_mnt->mf_server == fs) {
usr.sbin/amd/amd/map.c
629
plog(XLOG_INFO, "Flushed %s; dependent on %s", mp->am_path, fs->fs_host);
usr.sbin/amd/amd/mntfs.c
176
fserver *fs;
usr.sbin/amd/amd/mntfs.c
187
fs = ops->ffserver ? (*ops->ffserver)(mf) : (fserver *) 0;
usr.sbin/amd/amd/mntfs.c
190
mf->mf_server = fs;
usr.sbin/amd/amd/mtab.c
117
read_mtab(char *fs)
usr.sbin/amd/amd/nfs_ops.c
169
flush_nfs_fhandle_cache(fserver *fs)
usr.sbin/amd/amd/nfs_ops.c
173
if (fp->fh_fs == fs || fs == 0) {
usr.sbin/amd/amd/nfs_ops.c
198
prime_nfs_fhandle_cache(char *path, fserver *fs, fhstatus *fhbuf, void *wchan)
usr.sbin/amd/amd/nfs_ops.c
205
dlog("Searching cache for %s:%s", fs->fs_host, path);
usr.sbin/amd/amd/nfs_ops.c
212
if (fs == fp->fh_fs && strcmp(path, fp->fh_path) == 0) {
usr.sbin/amd/amd/nfs_ops.c
229
fs->fs_host, path);
usr.sbin/amd/amd/nfs_ops.c
233
fs->fs_host, path);
usr.sbin/amd/amd/nfs_ops.c
295
if (fp->fh_sin.sin_addr.s_addr != fs->fs_ip->sin_addr.s_addr) {
usr.sbin/amd/amd/nfs_ops.c
296
fp->fh_sin = *fs->fs_ip;
usr.sbin/amd/amd/nfs_ops.c
299
fp->fh_fs = dup_srvr(fs);
usr.sbin/amd/amd/nfs_ops.c
457
fserver *fs = mf->mf_server;
usr.sbin/amd/amd/nfs_ops.c
477
if (mf->mf_remopts && *mf->mf_remopts && !islocalnet(fs->fs_ip->sin_addr.s_addr))
usr.sbin/amd/amd/nfs_ops.c
594
nfs_args.addr = (struct sockaddr *)fs->fs_ip;
usr.sbin/amd/amd/nfs_ops.c
595
nfs_args.addrlen = sizeof(*fs->fs_ip);
usr.sbin/amd/amd/nfsx_ops.c
197
char *fs = mf->mf_fo->opt_fs;
usr.sbin/amd/amd/nfsx_ops.c
207
mp = str3cat(mp, fs, "/", rfs);
usr.sbin/amd/amd/srvr_afs.c
100
fserver *fs = arg;
usr.sbin/amd/amd/srvr_afs.c
106
if (fs->fs_refc == 0) {
usr.sbin/amd/amd/srvr_afs.c
108
dlog("Deleting file server %s", fs->fs_host);
usr.sbin/amd/amd/srvr_afs.c
110
if (fs->fs_flags & FSF_WANT)
usr.sbin/amd/amd/srvr_afs.c
111
wakeup_srvr(fs);
usr.sbin/amd/amd/srvr_afs.c
116
rem_que(&fs->fs_q);
usr.sbin/amd/amd/srvr_afs.c
120
if (fs->fs_private && fs->fs_prfree)
usr.sbin/amd/amd/srvr_afs.c
121
(*fs->fs_prfree)(fs->fs_private);
usr.sbin/amd/amd/srvr_afs.c
126
free(fs->fs_ip);
usr.sbin/amd/amd/srvr_afs.c
131
free(fs->fs_host);
usr.sbin/amd/amd/srvr_afs.c
136
free(fs);
usr.sbin/amd/amd/srvr_afs.c
144
free_srvr(fserver *fs)
usr.sbin/amd/amd/srvr_afs.c
146
if (--fs->fs_refc == 0) {
usr.sbin/amd/amd/srvr_afs.c
153
int ttl = (fs->fs_flags & (FSF_DOWN|FSF_ERROR)) ? 19 : AM_TTL;
usr.sbin/amd/amd/srvr_afs.c
155
dlog("Last hard reference to file server %s - will timeout in %ds", fs->fs_host, ttl);
usr.sbin/amd/amd/srvr_afs.c
157
if (fs->fs_cid) {
usr.sbin/amd/amd/srvr_afs.c
158
untimeout(fs->fs_cid);
usr.sbin/amd/amd/srvr_afs.c
162
fs->fs_flags &= ~FSF_PINGING;
usr.sbin/amd/amd/srvr_afs.c
167
fs->fs_cid = timeout(ttl, timeout_srvr, fs);
usr.sbin/amd/amd/srvr_afs.c
171
fs->fs_flags &= ~FSF_VALID;
usr.sbin/amd/amd/srvr_afs.c
172
fs->fs_flags |= FSF_DOWN;
usr.sbin/amd/amd/srvr_afs.c
180
dup_srvr(fserver *fs)
usr.sbin/amd/amd/srvr_afs.c
182
fs->fs_refc++;
usr.sbin/amd/amd/srvr_afs.c
183
return fs;
usr.sbin/amd/amd/srvr_afs.c
189
void srvrlog(fserver *fs, char *state)
usr.sbin/amd/amd/srvr_afs.c
191
plog(XLOG_INFO, "file server %s type %s %s", fs->fs_host, fs->fs_type, state);
usr.sbin/amd/amd/srvr_afs.c
55
fserver *fs = localhost;
usr.sbin/amd/amd/srvr_afs.c
57
if (!fs) {
usr.sbin/amd/amd/srvr_afs.c
58
fs = ALLOC(fserver);
usr.sbin/amd/amd/srvr_afs.c
59
fs->fs_refc = 0;
usr.sbin/amd/amd/srvr_afs.c
60
fs->fs_host = strdup("localhost");
usr.sbin/amd/amd/srvr_afs.c
61
fs->fs_ip = 0;
usr.sbin/amd/amd/srvr_afs.c
62
fs->fs_cid = 0;
usr.sbin/amd/amd/srvr_afs.c
63
fs->fs_pinger = 0;
usr.sbin/amd/amd/srvr_afs.c
64
fs->fs_flags = FSF_VALID;
usr.sbin/amd/amd/srvr_afs.c
65
fs->fs_type = "local";
usr.sbin/amd/amd/srvr_afs.c
66
fs->fs_private = 0;
usr.sbin/amd/amd/srvr_afs.c
67
fs->fs_prfree = 0;
usr.sbin/amd/amd/srvr_afs.c
69
ins_que(&fs->fs_q, &afs_srvr_list);
usr.sbin/amd/amd/srvr_afs.c
71
srvrlog(fs, "starts up");
usr.sbin/amd/amd/srvr_afs.c
73
localhost = fs;
usr.sbin/amd/amd/srvr_afs.c
76
fs->fs_refc++;
usr.sbin/amd/amd/srvr_afs.c
78
return fs;
usr.sbin/amd/amd/srvr_afs.c
88
wakeup_srvr(fserver *fs)
usr.sbin/amd/amd/srvr_afs.c
90
fs->fs_flags &= ~FSF_WANT;
usr.sbin/amd/amd/srvr_afs.c
91
wakeup(fs);
usr.sbin/amd/amd/srvr_nfs.c
148
fserver *fs = 0;
usr.sbin/amd/amd/srvr_nfs.c
153
ITER(fs, fserver, &nfs_srvr_list)
usr.sbin/amd/amd/srvr_nfs.c
154
if (fs == fs2)
usr.sbin/amd/amd/srvr_nfs.c
157
if (fs == fs2) {
usr.sbin/amd/amd/srvr_nfs.c
160
nfs_private *np = (nfs_private *) fs->fs_private;
usr.sbin/amd/amd/srvr_nfs.c
163
dlog("got port (%d) for mountd on %s", port, fs->fs_host);
usr.sbin/amd/amd/srvr_nfs.c
176
dlog("Error fetching port for mountd on %s", fs->fs_host);
usr.sbin/amd/amd/srvr_nfs.c
183
if (fs->fs_flags & FSF_WANT)
usr.sbin/amd/amd/srvr_nfs.c
184
wakeup_srvr(fs);
usr.sbin/amd/amd/srvr_nfs.c
200
call_portmap(fserver *fs, AUTH *auth, unsigned long prog,
usr.sbin/amd/amd/srvr_nfs.c
219
sin = *fs->fs_ip;
usr.sbin/amd/amd/srvr_nfs.c
222
&sin, &sin, fs, got_portmap);
usr.sbin/amd/amd/srvr_nfs.c
232
recompute_portmap(fserver *fs)
usr.sbin/amd/amd/srvr_nfs.c
242
nfs_private *np = (nfs_private *) fs->fs_private;
usr.sbin/amd/amd/srvr_nfs.c
245
call_portmap(fs, nfs_auth, MOUNTPROG,
usr.sbin/amd/amd/srvr_nfs.c
261
fserver *fs;
usr.sbin/amd/amd/srvr_nfs.c
272
ITER(fs, fserver, &nfs_srvr_list) {
usr.sbin/amd/amd/srvr_nfs.c
273
nfs_private *np = (nfs_private *) fs->fs_private;
usr.sbin/amd/amd/srvr_nfs.c
280
if (fs->fs_flags & FSF_DOWN) {
usr.sbin/amd/amd/srvr_nfs.c
281
fs->fs_flags &= ~FSF_DOWN;
usr.sbin/amd/amd/srvr_nfs.c
282
if (fs->fs_flags & FSF_VALID) {
usr.sbin/amd/amd/srvr_nfs.c
283
srvrlog(fs, "is up");
usr.sbin/amd/amd/srvr_nfs.c
286
srvrlog(fs, "ok");
usr.sbin/amd/amd/srvr_nfs.c
289
srvrlog(fs, "starts up");
usr.sbin/amd/amd/srvr_nfs.c
291
fs->fs_flags |= FSF_VALID;
usr.sbin/amd/amd/srvr_nfs.c
296
if (fs->fs_flags & FSF_WANT)
usr.sbin/amd/amd/srvr_nfs.c
297
wakeup_srvr(fs);
usr.sbin/amd/amd/srvr_nfs.c
299
map_flush_srvr(fs);
usr.sbin/amd/amd/srvr_nfs.c
301
if (fs->fs_flags & FSF_VALID) {
usr.sbin/amd/amd/srvr_nfs.c
303
dlog("file server %s type nfs is still up", fs->fs_host);
usr.sbin/amd/amd/srvr_nfs.c
307
srvrlog(fs, "ok");
usr.sbin/amd/amd/srvr_nfs.c
308
fs->fs_flags |= FSF_VALID;
usr.sbin/amd/amd/srvr_nfs.c
315
untimeout(fs->fs_cid);
usr.sbin/amd/amd/srvr_nfs.c
316
fs->fs_cid = timeout(fs->fs_pinger, nfs_keepalive, fs);
usr.sbin/amd/amd/srvr_nfs.c
322
(MAX_ALLOWED_PINGS - 1) * FAST_NFS_PING + fs->fs_pinger - 1;
usr.sbin/amd/amd/srvr_nfs.c
338
recompute_portmap(fs);
usr.sbin/amd/amd/srvr_nfs.c
359
fserver *fs = arg;
usr.sbin/amd/amd/srvr_nfs.c
361
nfs_private *np = (nfs_private *) fs->fs_private;
usr.sbin/amd/amd/srvr_nfs.c
371
if (FSRV_ISUP(fs)) {
usr.sbin/amd/amd/srvr_nfs.c
372
fs->fs_flags &= ~FSF_VALID;
usr.sbin/amd/amd/srvr_nfs.c
374
srvrlog(fs, "not responding");
usr.sbin/amd/amd/srvr_nfs.c
381
int oflags = fs->fs_flags;
usr.sbin/amd/amd/srvr_nfs.c
382
if ((fs->fs_flags & FSF_DOWN) == 0) {
usr.sbin/amd/amd/srvr_nfs.c
386
srvrlog(fs, "is down");
usr.sbin/amd/amd/srvr_nfs.c
387
fs->fs_flags |= FSF_DOWN|FSF_VALID;
usr.sbin/amd/amd/srvr_nfs.c
393
flush_nfs_fhandle_cache(fs);
usr.sbin/amd/amd/srvr_nfs.c
406
if ((fs->fs_flags & FSF_VALID) == 0)
usr.sbin/amd/amd/srvr_nfs.c
407
srvrlog(fs, "starts down");
usr.sbin/amd/amd/srvr_nfs.c
409
fs->fs_flags |= FSF_VALID;
usr.sbin/amd/amd/srvr_nfs.c
411
if (oflags != fs->fs_flags && (fs->fs_flags & FSF_WANT))
usr.sbin/amd/amd/srvr_nfs.c
412
wakeup_srvr(fs);
usr.sbin/amd/amd/srvr_nfs.c
416
dlog("%d pings to %s failed - at most %d allowed", np->np_ping, fs->fs_host, MAX_ALLOWED_PINGS);
usr.sbin/amd/amd/srvr_nfs.c
423
nfs_keepalive(fs);
usr.sbin/amd/amd/srvr_nfs.c
432
fserver *fs = arg;
usr.sbin/amd/amd/srvr_nfs.c
435
nfs_private *np = (nfs_private *) fs->fs_private;
usr.sbin/amd/amd/srvr_nfs.c
453
ping_len, fs->fs_ip, NULL, (void *)((long)np->np_xid),
usr.sbin/amd/amd/srvr_nfs.c
476
dlog("Sent NFS ping to %s", fs->fs_host);
usr.sbin/amd/amd/srvr_nfs.c
489
switch (fs->fs_flags & (FSF_DOWN|FSF_VALID)) {
usr.sbin/amd/amd/srvr_nfs.c
496
fstimeo = fs->fs_pinger;
usr.sbin/amd/amd/srvr_nfs.c
508
fs->fs_cid = timeout(fstimeo, nfs_timed_out, fs);
usr.sbin/amd/amd/srvr_nfs.c
512
nfs_srvr_port(fserver *fs, u_short *port, void *wchan)
usr.sbin/amd/amd/srvr_nfs.c
515
if ((fs->fs_flags & FSF_VALID) == FSF_VALID) {
usr.sbin/amd/amd/srvr_nfs.c
516
if ((fs->fs_flags & FSF_DOWN) == 0) {
usr.sbin/amd/amd/srvr_nfs.c
517
nfs_private *np = (nfs_private *) fs->fs_private;
usr.sbin/amd/amd/srvr_nfs.c
532
recompute_portmap(fs);
usr.sbin/amd/amd/srvr_nfs.c
539
if (error < 0 && wchan && !(fs->fs_flags & FSF_WANT)) {
usr.sbin/amd/amd/srvr_nfs.c
549
fs->fs_flags |= FSF_WANT;
usr.sbin/amd/amd/srvr_nfs.c
550
sched_task(wakeup_task, wchan, fs);
usr.sbin/amd/amd/srvr_nfs.c
556
start_nfs_pings(fserver *fs, int pingval)
usr.sbin/amd/amd/srvr_nfs.c
558
if (!(fs->fs_flags & FSF_PINGING)) {
usr.sbin/amd/amd/srvr_nfs.c
559
fs->fs_flags |= FSF_PINGING;
usr.sbin/amd/amd/srvr_nfs.c
560
if (fs->fs_cid)
usr.sbin/amd/amd/srvr_nfs.c
561
untimeout(fs->fs_cid);
usr.sbin/amd/amd/srvr_nfs.c
563
srvrlog(fs, "wired up");
usr.sbin/amd/amd/srvr_nfs.c
564
fs->fs_flags |= FSF_VALID;
usr.sbin/amd/amd/srvr_nfs.c
565
fs->fs_flags &= ~FSF_DOWN;
usr.sbin/amd/amd/srvr_nfs.c
567
nfs_keepalive(fs);
usr.sbin/amd/amd/srvr_nfs.c
571
dlog("Already running pings to %s", fs->fs_host);
usr.sbin/amd/amd/srvr_nfs.c
582
fserver *fs;
usr.sbin/amd/amd/srvr_nfs.c
621
ITER(fs, fserver, &nfs_srvr_list) {
usr.sbin/amd/amd/srvr_nfs.c
622
if (STREQ(host, fs->fs_host)) {
usr.sbin/amd/amd/srvr_nfs.c
623
start_nfs_pings(fs, pingval);
usr.sbin/amd/amd/srvr_nfs.c
624
fs->fs_refc++;
usr.sbin/amd/amd/srvr_nfs.c
625
return fs;
usr.sbin/amd/amd/srvr_nfs.c
657
fs = ALLOC(fserver);
usr.sbin/amd/amd/srvr_nfs.c
658
fs->fs_refc = 1;
usr.sbin/amd/amd/srvr_nfs.c
659
fs->fs_host = strdup(hp ? hp->h_name : "unknown_hostname");
usr.sbin/amd/amd/srvr_nfs.c
660
if (normalize_hosts) host_normalize(&fs->fs_host);
usr.sbin/amd/amd/srvr_nfs.c
661
fs->fs_ip = ip;
usr.sbin/amd/amd/srvr_nfs.c
662
fs->fs_cid = 0;
usr.sbin/amd/amd/srvr_nfs.c
664
fs->fs_flags = FSF_DOWN; /* Starts off down */
usr.sbin/amd/amd/srvr_nfs.c
666
fs->fs_flags = FSF_ERROR|FSF_VALID;
usr.sbin/amd/amd/srvr_nfs.c
670
fs->fs_type = "nfs";
usr.sbin/amd/amd/srvr_nfs.c
671
fs->fs_pinger = AM_PINGER;
usr.sbin/amd/amd/srvr_nfs.c
682
fs->fs_private = np;
usr.sbin/amd/amd/srvr_nfs.c
683
fs->fs_prfree = free;
usr.sbin/amd/amd/srvr_nfs.c
685
if (!(fs->fs_flags & FSF_ERROR)) {
usr.sbin/amd/amd/srvr_nfs.c
689
start_nfs_pings(fs, pingval);
usr.sbin/amd/amd/srvr_nfs.c
695
ins_que(&fs->fs_q, &nfs_srvr_list);
usr.sbin/amd/amd/srvr_nfs.c
697
return fs;
usr.sbin/amd/amd/srvr_nfs.c
93
fserver *fs = 0;
usr.sbin/amd/amd/srvr_nfs.c
95
ITER(fs, fserver, &nfs_srvr_list) {
usr.sbin/amd/amd/srvr_nfs.c
96
nfs_private *np = (nfs_private *) fs->fs_private;
usr.sbin/amd/amq/amq.c
441
char *fs = argv[optind++];
usr.sbin/amd/amq/amq.c
446
amqproc_umnt_57(&fs, clnt);
usr.sbin/amd/amq/amq.c
451
amq_mount_tree_p *mtp = amqproc_mnttree_57(&fs, clnt);
usr.sbin/amd/amq/amq.c
470
__progname, fs);
usr.sbin/amd/include/am.h
474
#define FSRV_ISDOWN(fs) (((fs)->fs_flags & (FSF_DOWN|FSF_VALID)) == (FSF_DOWN|FSF_VALID))
usr.sbin/amd/include/am.h
475
#define FSRV_ISUP(fs) (((fs)->fs_flags & (FSF_DOWN|FSF_VALID)) == (FSF_VALID))
usr.sbin/bgpctl/parser.c
1088
struct filter_set *fs;
usr.sbin/bgpctl/parser.c
1112
if ((fs = calloc(1, sizeof(struct filter_set))) == NULL)
usr.sbin/bgpctl/parser.c
1116
fs->type = ACTION_SET_LOCALPREF;
usr.sbin/bgpctl/parser.c
1117
fs->action.metric = uval;
usr.sbin/bgpctl/parser.c
1120
fs->type = ACTION_SET_MED;
usr.sbin/bgpctl/parser.c
1121
fs->action.metric = uval;
usr.sbin/bgpctl/parser.c
1125
free(fs);
usr.sbin/bgpctl/parser.c
1128
fs->type = ACTION_SET_PREPEND_PEER;
usr.sbin/bgpctl/parser.c
1129
fs->action.prepend = uval;
usr.sbin/bgpctl/parser.c
1133
free(fs);
usr.sbin/bgpctl/parser.c
1136
fs->type = ACTION_SET_PREPEND_SELF;
usr.sbin/bgpctl/parser.c
1137
fs->action.prepend = uval;
usr.sbin/bgpctl/parser.c
1140
fs->type = ACTION_SET_WEIGHT;
usr.sbin/bgpctl/parser.c
1141
fs->action.metric = uval;
usr.sbin/bgpctl/parser.c
1147
TAILQ_INSERT_TAIL(&r->set, fs, entry);
usr.sbin/bgpctl/parser.c
1454
struct filter_set *fs;
usr.sbin/bgpctl/parser.c
1456
if ((fs = calloc(1, sizeof(struct filter_set))) == NULL)
usr.sbin/bgpctl/parser.c
1460
fs->type = ACTION_SET_NEXTHOP_BLACKHOLE;
usr.sbin/bgpctl/parser.c
1462
fs->type = ACTION_SET_NEXTHOP_REJECT;
usr.sbin/bgpctl/parser.c
1464
fs->type = ACTION_SET_NEXTHOP_NOMODIFY;
usr.sbin/bgpctl/parser.c
1465
else if (parse_addr(word, &fs->action.nexthop)) {
usr.sbin/bgpctl/parser.c
1466
fs->type = ACTION_SET_NEXTHOP;
usr.sbin/bgpctl/parser.c
1468
free(fs);
usr.sbin/bgpctl/parser.c
1472
TAILQ_INSERT_TAIL(&r->set, fs, entry);
usr.sbin/bgpctl/parser.c
529
struct filter_set *fs;
usr.sbin/bgpctl/parser.c
688
if ((fs = calloc(1, sizeof(*fs))) == NULL)
usr.sbin/bgpctl/parser.c
690
fs->type = ACTION_SET_COMMUNITY;
usr.sbin/bgpctl/parser.c
691
fs->action.community = res.community;
usr.sbin/bgpctl/parser.c
692
TAILQ_INSERT_TAIL(&res.set, fs, entry);
usr.sbin/bgpctl/parser.c
704
if ((fs = calloc(1, sizeof(*fs))) == NULL)
usr.sbin/bgpctl/parser.c
706
fs->type = ACTION_SET_COMMUNITY;
usr.sbin/bgpctl/parser.c
707
fs->action.community = res.community;
usr.sbin/bgpctl/parser.c
708
TAILQ_INSERT_TAIL(&res.set, fs, entry);
usr.sbin/bgpctl/parser.c
721
if ((fs = calloc(1, sizeof(*fs))) == NULL)
usr.sbin/bgpctl/parser.c
723
fs->type = ACTION_SET_COMMUNITY;
usr.sbin/bgpctl/parser.c
724
fs->action.community = res.community;
usr.sbin/bgpctl/parser.c
725
TAILQ_INSERT_TAIL(&res.set, fs, entry);
usr.sbin/bgpctl/parser.c
791
if ((fs = calloc(1,
usr.sbin/bgpctl/parser.c
794
if (strlcpy(fs->action.pftable, word,
usr.sbin/bgpctl/parser.c
795
sizeof(fs->action.pftable)) >=
usr.sbin/bgpctl/parser.c
796
sizeof(fs->action.pftable))
usr.sbin/bgpctl/parser.c
798
TAILQ_INSERT_TAIL(&res.set, fs, entry);
usr.sbin/bgpd/kroute.c
273
ktable_new(u_int rtableid, u_int rdomid, char *name, int fs)
usr.sbin/bgpd/kroute.c
309
kt->fib_conf = kt->fib_sync = fs;
usr.sbin/edquota/edquota.c
233
struct fstab *fs;
usr.sbin/edquota/edquota.c
245
while ((fs = getfsent())) {
usr.sbin/edquota/edquota.c
246
if (strcmp(fs->fs_vfstype, "ffs") &&
usr.sbin/edquota/edquota.c
247
strcmp(fs->fs_vfstype, "ufs") &&
usr.sbin/edquota/edquota.c
248
strcmp(fs->fs_vfstype, "mfs"))
usr.sbin/edquota/edquota.c
250
if (!hasquota(fs, quotatype, &qfpathname))
usr.sbin/edquota/edquota.c
256
if (quotactl(fs->fs_file, qcmd, id, (char *)&qup->dqblk) != 0) {
usr.sbin/edquota/edquota.c
267
quotagroup, fs->fs_file);
usr.sbin/edquota/edquota.c
305
strlcpy(qup->fsname, fs->fs_file, sizeof qup->fsname);
usr.sbin/edquota/edquota.c
713
hasquota(struct fstab *fs, int type, char **qfnamep)
usr.sbin/edquota/edquota.c
727
strlcpy(buf, fs->fs_mntops, sizeof buf);
usr.sbin/edquota/edquota.c
743
fs->fs_file, qfname, qfextension[type]);
usr.sbin/eigrpd/kroute.c
141
kr_init(int fs, unsigned int rdomain)
usr.sbin/eigrpd/kroute.c
146
kr_state.fib_sync = fs;
usr.sbin/installboot/i386_installboot.c
1020
sbchk(struct fs *fs, daddr_t sbloc)
usr.sbin/installboot/i386_installboot.c
1025
if (fs->fs_magic != FS_UFS2_MAGIC && fs->fs_magic != FS_UFS1_MAGIC) {
usr.sbin/installboot/i386_installboot.c
1028
fs->fs_magic);
usr.sbin/installboot/i386_installboot.c
1036
if (fs->fs_magic == FS_UFS1_MAGIC && sbloc == SBLOCK_UFS2) {
usr.sbin/installboot/i386_installboot.c
1043
if (fs->fs_bsize <= 0 || fs->fs_bsize < sizeof(struct fs) ||
usr.sbin/installboot/i386_installboot.c
1044
fs->fs_bsize > MAXBSIZE) {
usr.sbin/installboot/i386_installboot.c
1047
fs->fs_bsize);
usr.sbin/installboot/i386_installboot.c
1051
if (fs->fs_sbsize <= 0 || fs->fs_sbsize > SBSIZE) {
usr.sbin/installboot/i386_installboot.c
1054
fs->fs_sbsize);
usr.sbin/installboot/i386_installboot.c
1058
if (fs->fs_inopb <= 0) {
usr.sbin/installboot/i386_installboot.c
1061
fs->fs_inopb);
usr.sbin/installboot/i386_installboot.c
1067
fs->fs_magic == FS_UFS2_MAGIC ? "ffs2" : "ffs1");
usr.sbin/installboot/i386_installboot.c
1073
sbread(int fd, daddr_t poffset, struct fs **fs, char *sblock)
usr.sbin/installboot/i386_installboot.c
1081
*fs = (struct fs *)sblock;
usr.sbin/installboot/i386_installboot.c
1082
if (sbchk(*fs, sbtry[i]))
usr.sbin/installboot/i386_installboot.c
792
struct fs *fs;
usr.sbin/installboot/i386_installboot.c
859
sbread(devfd, DL_SECTOBLK(dl, pp->p_offset), &fs, sblock);
usr.sbin/installboot/i386_installboot.c
862
if ((buf = malloc(fs->fs_bsize)) == NULL)
usr.sbin/installboot/i386_installboot.c
865
blk = fsbtodb(fs, ino_to_fsba(fs, fsb.st_ino));
usr.sbin/installboot/i386_installboot.c
872
fs->fs_bsize, "inode");
usr.sbin/installboot/i386_installboot.c
873
if (fs->fs_magic == FS_UFS2_MAGIC) {
usr.sbin/installboot/i386_installboot.c
875
ino_to_fsbo(fs, fsb.st_ino);
usr.sbin/installboot/i386_installboot.c
876
ndb = howmany(ip2->di_size, fs->fs_bsize);
usr.sbin/installboot/i386_installboot.c
881
ino_to_fsbo(fs, fsb.st_ino);
usr.sbin/installboot/i386_installboot.c
882
ndb = howmany(ip1->di_size, fs->fs_bsize);
usr.sbin/installboot/i386_installboot.c
894
sym_set_value(pbr_symbols, "_fs_bsize_p", (fs->fs_bsize / 16));
usr.sbin/installboot/i386_installboot.c
895
sym_set_value(pbr_symbols, "_fs_bsize_s", (fs->fs_bsize /
usr.sbin/installboot/i386_installboot.c
908
ffs(fs->fs_fsize / dl->d_secsize) - 1);
usr.sbin/installboot/i386_installboot.c
912
ino_to_fsba(fs, fsb.st_ino));
usr.sbin/installboot/i386_installboot.c
920
boot, ndb, fs->fs_bsize);
usr.sbin/installboot/i386_installboot.c
923
ffs(fs->fs_fsize / dl->d_secsize) - 1,
usr.sbin/installboot/i386_installboot.c
925
ino_to_fsba(fs, fsb.st_ino),
usr.sbin/installboot/i386_installboot.c
95
static int sbchk(struct fs *, daddr_t);
usr.sbin/installboot/i386_installboot.c
96
static void sbread(int, daddr_t, struct fs **, char *);
usr.sbin/ldpd/kroute.c
154
kr_init(int fs, unsigned int rdomain)
usr.sbin/ldpd/kroute.c
160
kr_state.fib_sync = fs;
usr.sbin/makefs/ffs.c
261
struct fs *superblock;
usr.sbin/makefs/ffs.c
476
struct fs *fs;
usr.sbin/makefs/ffs.c
525
fs = ffs_mkfs(image, fsopts, tstamp);
usr.sbin/makefs/ffs.c
526
fsopts->superblock = (void *)fs;
usr.sbin/makefs/ffs.c
528
if ((off_t)(fs->fs_cstotal.cs_nifree + ROOTINO) < fsopts->inodes) {
usr.sbin/makefs/ffs.c
532
(long long)(fs->fs_cstotal.cs_nifree + ROOTINO),
usr.sbin/makefs/ffs.c
800
in.i_fs = (struct fs *)fsopts->superblock;
usr.sbin/makefs/ffs.c
923
struct fs *fs;
usr.sbin/makefs/ffs.c
935
fs = (struct fs *)fsopts->superblock;
usr.sbin/makefs/ffs.c
936
cg = ino_to_cg(fs, ino);
usr.sbin/makefs/ffs.c
937
cgino = ino % fs->fs_ipg;
usr.sbin/makefs/ffs.c
939
ffs_rdfs(fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, &sbbuf,
usr.sbin/makefs/ffs.c
947
buf = emalloc(fs->fs_bsize);
usr.sbin/makefs/ffs.c
951
if (fs->fs_cstotal.cs_nifree == 0)
usr.sbin/makefs/ffs.c
954
if (fs->fs_cs(fs, cg).cs_nifree == 0)
usr.sbin/makefs/ffs.c
960
fs->fs_cstotal.cs_nifree--;
usr.sbin/makefs/ffs.c
961
fs->fs_cs(fs, cg).cs_nifree--;
usr.sbin/makefs/ffs.c
964
fs->fs_cstotal.cs_ndir++;
usr.sbin/makefs/ffs.c
965
fs->fs_cs(fs, cg).cs_ndir++;
usr.sbin/makefs/ffs.c
973
(uint32_t)(cgino + INOPB(fs)) > initediblk &&
usr.sbin/makefs/ffs.c
975
memset(buf, 0, fs->fs_bsize);
usr.sbin/makefs/ffs.c
977
for (i = 0; i < INOPB(fs); i++) {
usr.sbin/makefs/ffs.c
981
ffs_wtfs(fsbtodb(fs, ino_to_fsba(fs,
usr.sbin/makefs/ffs.c
982
cg * fs->fs_ipg + initediblk)),
usr.sbin/makefs/ffs.c
983
fs->fs_bsize, buf, fsopts);
usr.sbin/makefs/ffs.c
984
initediblk += INOPB(fs);
usr.sbin/makefs/ffs.c
989
ffs_wtfs(fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, &sbbuf,
usr.sbin/makefs/ffs.c
993
d = fsbtodb(fs, ino_to_fsba(fs, ino));
usr.sbin/makefs/ffs.c
994
ffs_rdfs(d, fs->fs_bsize, buf, fsopts);
usr.sbin/makefs/ffs.c
996
dp1[ino_to_fsbo(fs, ino)] = dp->ffs1_din;
usr.sbin/makefs/ffs.c
998
dp2[ino_to_fsbo(fs, ino)] = dp->ffs2_din;
usr.sbin/makefs/ffs.c
999
ffs_wtfs(d, fs->fs_bsize, buf, fsopts);
usr.sbin/makefs/ffs/buf.c
115
fsinfo_t *fs = bp->b_fs;
usr.sbin/makefs/ffs/buf.c
118
offset = bp->b_blkno * fs->sectorsize + fs->offset;
usr.sbin/makefs/ffs/buf.c
180
bp->b_fs = vp->fs;
usr.sbin/makefs/ffs/buf.c
59
fsinfo_t *fs = vp->fs;
usr.sbin/makefs/ffs/buf.c
64
offset = (*bpp)->b_blkno * fs->sectorsize + fs->offset;
usr.sbin/makefs/ffs/buf.h
59
struct makefs_fsinfo *fs;
usr.sbin/makefs/ffs/ffs_alloc.c
102
cg = ino_to_cg(fs, ip->i_number);
usr.sbin/makefs/ffs/ffs_alloc.c
104
cg = dtog(fs, bpref);
usr.sbin/makefs/ffs/ffs_alloc.c
145
struct fs *fs;
usr.sbin/makefs/ffs/ffs_alloc.c
149
fs = ip->i_fs;
usr.sbin/makefs/ffs/ffs_alloc.c
150
if (indx % fs->fs_maxbpg == 0 || bap[indx - 1] == 0) {
usr.sbin/makefs/ffs/ffs_alloc.c
151
if (lbn < NDADDR + NINDIR(fs)) {
usr.sbin/makefs/ffs/ffs_alloc.c
152
cg = ino_to_cg(fs, ip->i_number);
usr.sbin/makefs/ffs/ffs_alloc.c
153
return (fs->fs_fpg * cg + fs->fs_frag);
usr.sbin/makefs/ffs/ffs_alloc.c
161
ino_to_cg(fs, ip->i_number) + lbn / fs->fs_maxbpg;
usr.sbin/makefs/ffs/ffs_alloc.c
163
startcg = dtog(fs, bap[indx - 1] + 1);
usr.sbin/makefs/ffs/ffs_alloc.c
164
startcg %= fs->fs_ncg;
usr.sbin/makefs/ffs/ffs_alloc.c
165
avgbfree = fs->fs_cstotal.cs_nbfree / fs->fs_ncg;
usr.sbin/makefs/ffs/ffs_alloc.c
166
for (cg = startcg; cg < fs->fs_ncg; cg++)
usr.sbin/makefs/ffs/ffs_alloc.c
167
if (fs->fs_cs(fs, cg).cs_nbfree >= avgbfree)
usr.sbin/makefs/ffs/ffs_alloc.c
168
return (fs->fs_fpg * cg + fs->fs_frag);
usr.sbin/makefs/ffs/ffs_alloc.c
170
if (fs->fs_cs(fs, cg).cs_nbfree >= avgbfree)
usr.sbin/makefs/ffs/ffs_alloc.c
171
return (fs->fs_fpg * cg + fs->fs_frag);
usr.sbin/makefs/ffs/ffs_alloc.c
177
return bap[indx - 1] + fs->fs_frag;
usr.sbin/makefs/ffs/ffs_alloc.c
183
struct fs *fs;
usr.sbin/makefs/ffs/ffs_alloc.c
187
fs = ip->i_fs;
usr.sbin/makefs/ffs/ffs_alloc.c
188
if (indx % fs->fs_maxbpg == 0 || bap[indx - 1] == 0) {
usr.sbin/makefs/ffs/ffs_alloc.c
189
if (lbn < NDADDR + NINDIR(fs)) {
usr.sbin/makefs/ffs/ffs_alloc.c
190
cg = ino_to_cg(fs, ip->i_number);
usr.sbin/makefs/ffs/ffs_alloc.c
191
return (fs->fs_fpg * cg + fs->fs_frag);
usr.sbin/makefs/ffs/ffs_alloc.c
199
ino_to_cg(fs, ip->i_number) + lbn / fs->fs_maxbpg;
usr.sbin/makefs/ffs/ffs_alloc.c
201
startcg = dtog(fs, bap[indx - 1] + 1);
usr.sbin/makefs/ffs/ffs_alloc.c
202
startcg %= fs->fs_ncg;
usr.sbin/makefs/ffs/ffs_alloc.c
203
avgbfree = fs->fs_cstotal.cs_nbfree / fs->fs_ncg;
usr.sbin/makefs/ffs/ffs_alloc.c
204
for (cg = startcg; cg < fs->fs_ncg; cg++)
usr.sbin/makefs/ffs/ffs_alloc.c
205
if (fs->fs_cs(fs, cg).cs_nbfree >= avgbfree) {
usr.sbin/makefs/ffs/ffs_alloc.c
206
return (fs->fs_fpg * cg + fs->fs_frag);
usr.sbin/makefs/ffs/ffs_alloc.c
209
if (fs->fs_cs(fs, cg).cs_nbfree >= avgbfree) {
usr.sbin/makefs/ffs/ffs_alloc.c
210
return (fs->fs_fpg * cg + fs->fs_frag);
usr.sbin/makefs/ffs/ffs_alloc.c
217
return bap[indx - 1] + fs->fs_frag;
usr.sbin/makefs/ffs/ffs_alloc.c
235
struct fs *fs;
usr.sbin/makefs/ffs/ffs_alloc.c
239
fs = ip->i_fs;
usr.sbin/makefs/ffs/ffs_alloc.c
249
for (i = 1; i < fs->fs_ncg; i *= 2) {
usr.sbin/makefs/ffs/ffs_alloc.c
251
if (cg >= fs->fs_ncg)
usr.sbin/makefs/ffs/ffs_alloc.c
252
cg -= fs->fs_ncg;
usr.sbin/makefs/ffs/ffs_alloc.c
262
cg = (icg + 2) % fs->fs_ncg;
usr.sbin/makefs/ffs/ffs_alloc.c
263
for (i = 2; i < fs->fs_ncg; i++) {
usr.sbin/makefs/ffs/ffs_alloc.c
268
if (cg == fs->fs_ncg)
usr.sbin/makefs/ffs/ffs_alloc.c
287
struct fs *fs = ip->i_fs;
usr.sbin/makefs/ffs/ffs_alloc.c
289
if (fs->fs_cs(fs, cg).cs_nbfree == 0 && size == fs->fs_bsize)
usr.sbin/makefs/ffs/ffs_alloc.c
291
error = bread(ip->i_devvp, fsbtodb(fs, cgtod(fs, cg)),
usr.sbin/makefs/ffs/ffs_alloc.c
292
(int)fs->fs_cgsize, 0, &bp);
usr.sbin/makefs/ffs/ffs_alloc.c
298
(cgp->cg_cs.cs_nbfree == 0 && size == fs->fs_bsize)) {
usr.sbin/makefs/ffs/ffs_alloc.c
302
if (size == fs->fs_bsize) {
usr.sbin/makefs/ffs/ffs_alloc.c
312
frags = numfrags(fs, size);
usr.sbin/makefs/ffs/ffs_alloc.c
313
for (allocsiz = frags; allocsiz < fs->fs_frag; allocsiz++)
usr.sbin/makefs/ffs/ffs_alloc.c
316
if (allocsiz == fs->fs_frag) {
usr.sbin/makefs/ffs/ffs_alloc.c
326
bpref = dtogd(fs, bno);
usr.sbin/makefs/ffs/ffs_alloc.c
327
for (i = frags; i < fs->fs_frag; i++)
usr.sbin/makefs/ffs/ffs_alloc.c
329
i = fs->fs_frag - frags;
usr.sbin/makefs/ffs/ffs_alloc.c
331
fs->fs_cstotal.cs_nffree += i;
usr.sbin/makefs/ffs/ffs_alloc.c
332
fs->fs_cs(fs, cg).cs_nffree += i;
usr.sbin/makefs/ffs/ffs_alloc.c
333
fs->fs_fmod = 1;
usr.sbin/makefs/ffs/ffs_alloc.c
338
bno = ffs_mapsearch(fs, cgp, bpref, allocsiz);
usr.sbin/makefs/ffs/ffs_alloc.c
342
fs->fs_cstotal.cs_nffree -= frags;
usr.sbin/makefs/ffs/ffs_alloc.c
343
fs->fs_cs(fs, cg).cs_nffree -= frags;
usr.sbin/makefs/ffs/ffs_alloc.c
344
fs->fs_fmod = 1;
usr.sbin/makefs/ffs/ffs_alloc.c
348
blkno = cg * fs->fs_fpg + bno;
usr.sbin/makefs/ffs/ffs_alloc.c
370
struct fs *fs = ip->i_fs;
usr.sbin/makefs/ffs/ffs_alloc.c
375
if (bpref == 0 || dtog(fs, bpref) != cgp->cg_cgx) {
usr.sbin/makefs/ffs/ffs_alloc.c
378
bpref = blknum(fs, bpref);
usr.sbin/makefs/ffs/ffs_alloc.c
379
bno = dtogd(fs, bpref);
usr.sbin/makefs/ffs/ffs_alloc.c
383
if (ffs_isblock(fs, blksfree, fragstoblks(fs, bno)))
usr.sbin/makefs/ffs/ffs_alloc.c
389
bno = ffs_mapsearch(fs, cgp, bpref, (int)fs->fs_frag);
usr.sbin/makefs/ffs/ffs_alloc.c
394
blkno = fragstoblks(fs, bno);
usr.sbin/makefs/ffs/ffs_alloc.c
395
ffs_clrblock(fs, blksfree, (long)blkno);
usr.sbin/makefs/ffs/ffs_alloc.c
396
ffs_clusteracct(fs, cgp, blkno, -1);
usr.sbin/makefs/ffs/ffs_alloc.c
398
fs->fs_cstotal.cs_nbfree--;
usr.sbin/makefs/ffs/ffs_alloc.c
399
fs->fs_cs(fs, cgp->cg_cgx).cs_nbfree--;
usr.sbin/makefs/ffs/ffs_alloc.c
400
fs->fs_fmod = 1;
usr.sbin/makefs/ffs/ffs_alloc.c
401
blkno = cgp->cg_cgx * fs->fs_fpg + bno;
usr.sbin/makefs/ffs/ffs_alloc.c
422
ffs_mapsearch(struct fs *fs, struct cg *cgp, daddr_t bpref, int allocsiz)
usr.sbin/makefs/ffs/ffs_alloc.c
434
start = dtogd(fs, bpref) / NBBY;
usr.sbin/makefs/ffs/ffs_alloc.c
437
len = howmany(fs->fs_fpg, NBBY) - start;
usr.sbin/makefs/ffs/ffs_alloc.c
442
(const u_char *)fragtbl[fs->fs_frag],
usr.sbin/makefs/ffs/ffs_alloc.c
443
(1 << (allocsiz - 1 + (fs->fs_frag % NBBY))));
usr.sbin/makefs/ffs/ffs_alloc.c
449
(const u_char *)fragtbl[fs->fs_frag],
usr.sbin/makefs/ffs/ffs_alloc.c
450
(1 << (allocsiz - 1 + (fs->fs_frag % NBBY))));
usr.sbin/makefs/ffs/ffs_alloc.c
464
for (i = bno + NBBY; bno < i; bno += fs->fs_frag) {
usr.sbin/makefs/ffs/ffs_alloc.c
465
blk = blkmap(fs, cg_blksfree(cgp), bno);
usr.sbin/makefs/ffs/ffs_alloc.c
469
for (pos = 0; pos <= fs->fs_frag - allocsiz; pos++) {
usr.sbin/makefs/ffs/ffs_alloc.c
63
static int32_t ffs_mapsearch(struct fs *, struct cg *, daddr_t, int);
usr.sbin/makefs/ffs/ffs_alloc.c
88
struct fs *fs = ip->i_fs;
usr.sbin/makefs/ffs/ffs_alloc.c
93
if (size > fs->fs_bsize || fragoff(fs, size) != 0) {
usr.sbin/makefs/ffs/ffs_alloc.c
95
fs->fs_bsize, size);
usr.sbin/makefs/ffs/ffs_alloc.c
97
if (size == fs->fs_bsize && fs->fs_cstotal.cs_nbfree == 0)
usr.sbin/makefs/ffs/ffs_alloc.c
99
if (bpref >= fs->fs_size)
usr.sbin/makefs/ffs/ffs_balloc.c
102
osize = blksize(fs, ip, nb);
usr.sbin/makefs/ffs/ffs_balloc.c
103
if (osize < fs->fs_bsize && osize > 0) {
usr.sbin/makefs/ffs/ffs_balloc.c
115
if (nb != 0 && ip->i_ffs1_size >= lblktosize(fs, lbn + 1)) {
usr.sbin/makefs/ffs/ffs_balloc.c
125
error = bread(ip->i_devvp, lbn, fs->fs_bsize,
usr.sbin/makefs/ffs/ffs_balloc.c
140
osize = fragroundup(fs, blkoff(fs, ip->i_ffs1_size));
usr.sbin/makefs/ffs/ffs_balloc.c
141
nsize = fragroundup(fs, size);
usr.sbin/makefs/ffs/ffs_balloc.c
170
if (ip->i_ffs1_size < lblktosize(fs, lbn + 1))
usr.sbin/makefs/ffs/ffs_balloc.c
171
nsize = fragroundup(fs, size);
usr.sbin/makefs/ffs/ffs_balloc.c
173
nsize = fs->fs_bsize;
usr.sbin/makefs/ffs/ffs_balloc.c
182
bp->b_blkno = fsbtodb(fs, newb);
usr.sbin/makefs/ffs/ffs_balloc.c
214
error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb);
usr.sbin/makefs/ffs/ffs_balloc.c
219
bp = getblk(ip->i_devvp, indirs[1].in_lbn, fs->fs_bsize, 0, 0);
usr.sbin/makefs/ffs/ffs_balloc.c
220
bp->b_blkno = fsbtodb(fs, nb);
usr.sbin/makefs/ffs/ffs_balloc.c
237
error = bread(ip->i_devvp, indirs[i].in_lbn, fs->fs_bsize,
usr.sbin/makefs/ffs/ffs_balloc.c
254
error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb);
usr.sbin/makefs/ffs/ffs_balloc.c
261
nbp = getblk(ip->i_devvp, indirs[i].in_lbn, fs->fs_bsize, 0, 0);
usr.sbin/makefs/ffs/ffs_balloc.c
262
nbp->b_blkno = fsbtodb(fs, nb);
usr.sbin/makefs/ffs/ffs_balloc.c
284
error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb);
usr.sbin/makefs/ffs/ffs_balloc.c
292
nbp = getblk(ip->i_devvp, lbn, fs->fs_bsize, 0, 0);
usr.sbin/makefs/ffs/ffs_balloc.c
293
nbp->b_blkno = fsbtodb(fs, nb);
usr.sbin/makefs/ffs/ffs_balloc.c
308
error = bread(ip->i_devvp, lbn, (int)fs->fs_bsize, 0, &nbp);
usr.sbin/makefs/ffs/ffs_balloc.c
324
struct fs *fs = ip->i_fs;
usr.sbin/makefs/ffs/ffs_balloc.c
332
lbn = lblkno(fs, offset);
usr.sbin/makefs/ffs/ffs_balloc.c
333
size = blkoff(fs, offset) + bufsize;
usr.sbin/makefs/ffs/ffs_balloc.c
338
assert(size <= fs->fs_bsize);
usr.sbin/makefs/ffs/ffs_balloc.c
348
lastlbn = lblkno(fs, ip->i_ffs2_size);
usr.sbin/makefs/ffs/ffs_balloc.c
351
osize = blksize(fs, ip, nb);
usr.sbin/makefs/ffs/ffs_balloc.c
352
if (osize < fs->fs_bsize && osize > 0) {
usr.sbin/makefs/ffs/ffs_balloc.c
364
if (nb != 0 && ip->i_ffs2_size >= lblktosize(fs, lbn + 1)) {
usr.sbin/makefs/ffs/ffs_balloc.c
374
error = bread(ip->i_devvp, lbn, fs->fs_bsize,
usr.sbin/makefs/ffs/ffs_balloc.c
389
osize = fragroundup(fs, blkoff(fs, ip->i_ffs2_size));
usr.sbin/makefs/ffs/ffs_balloc.c
390
nsize = fragroundup(fs, size);
usr.sbin/makefs/ffs/ffs_balloc.c
419
if (ip->i_ffs2_size < lblktosize(fs, lbn + 1))
usr.sbin/makefs/ffs/ffs_balloc.c
420
nsize = fragroundup(fs, size);
usr.sbin/makefs/ffs/ffs_balloc.c
422
nsize = fs->fs_bsize;
usr.sbin/makefs/ffs/ffs_balloc.c
431
bp->b_blkno = fsbtodb(fs, newb);
usr.sbin/makefs/ffs/ffs_balloc.c
463
error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb);
usr.sbin/makefs/ffs/ffs_balloc.c
468
bp = getblk(ip->i_devvp, indirs[1].in_lbn, fs->fs_bsize, 0, 0);
usr.sbin/makefs/ffs/ffs_balloc.c
469
bp->b_blkno = fsbtodb(fs, nb);
usr.sbin/makefs/ffs/ffs_balloc.c
486
error = bread(ip->i_devvp, indirs[i].in_lbn, fs->fs_bsize,
usr.sbin/makefs/ffs/ffs_balloc.c
503
error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb);
usr.sbin/makefs/ffs/ffs_balloc.c
510
nbp = getblk(ip->i_devvp, indirs[i].in_lbn, fs->fs_bsize, 0, 0);
usr.sbin/makefs/ffs/ffs_balloc.c
511
nbp->b_blkno = fsbtodb(fs, nb);
usr.sbin/makefs/ffs/ffs_balloc.c
533
error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb);
usr.sbin/makefs/ffs/ffs_balloc.c
541
nbp = getblk(ip->i_devvp, lbn, fs->fs_bsize, 0, 0);
usr.sbin/makefs/ffs/ffs_balloc.c
542
nbp->b_blkno = fsbtodb(fs, nb);
usr.sbin/makefs/ffs/ffs_balloc.c
557
error = bread(ip->i_devvp, lbn, (int)fs->fs_bsize, 0,
usr.sbin/makefs/ffs/ffs_balloc.c
75
struct fs *fs = ip->i_fs;
usr.sbin/makefs/ffs/ffs_balloc.c
83
lbn = lblkno(fs, offset);
usr.sbin/makefs/ffs/ffs_balloc.c
84
size = blkoff(fs, offset) + bufsize;
usr.sbin/makefs/ffs/ffs_balloc.c
89
assert(size <= fs->fs_bsize);
usr.sbin/makefs/ffs/ffs_balloc.c
99
lastlbn = lblkno(fs, ip->i_ffs1_size);
usr.sbin/makefs/ffs/ffs_extern.h
53
void ffs_clusteracct(struct fs *, struct cg *, int32_t, int);
usr.sbin/makefs/ffs/ffs_extern.h
59
int ffs_isblock(struct fs *, u_char *, int32_t);
usr.sbin/makefs/ffs/ffs_extern.h
60
void ffs_clrblock(struct fs *, u_char *, int32_t);
usr.sbin/makefs/ffs/ffs_extern.h
61
void ffs_setblock(struct fs *, u_char *, int32_t);
usr.sbin/makefs/ffs/ffs_subr.c
106
ffs_setblock(struct fs *fs, u_char *cp, int32_t h)
usr.sbin/makefs/ffs/ffs_subr.c
109
switch ((int)fs->fs_fragshift) {
usr.sbin/makefs/ffs/ffs_subr.c
124
(int)fs->fs_fragshift);
usr.sbin/makefs/ffs/ffs_subr.c
134
ffs_clusteracct(struct fs *fs, struct cg *cgp, int32_t blkno, int cnt)
usr.sbin/makefs/ffs/ffs_subr.c
143
if (fs->fs_contigsumsize <= 0)
usr.sbin/makefs/ffs/ffs_subr.c
158
end = start + fs->fs_contigsumsize;
usr.sbin/makefs/ffs/ffs_subr.c
179
end = start - fs->fs_contigsumsize;
usr.sbin/makefs/ffs/ffs_subr.c
201
if (i > fs->fs_contigsumsize)
usr.sbin/makefs/ffs/ffs_subr.c
202
i = fs->fs_contigsumsize;
usr.sbin/makefs/ffs/ffs_subr.c
212
lp = &sump[fs->fs_contigsumsize];
usr.sbin/makefs/ffs/ffs_subr.c
213
for (i = fs->fs_contigsumsize; i > 0; i--)
usr.sbin/makefs/ffs/ffs_subr.c
54
ffs_isblock(struct fs *fs, u_char *cp, int32_t h)
usr.sbin/makefs/ffs/ffs_subr.c
58
switch ((int)fs->fs_fragshift) {
usr.sbin/makefs/ffs/ffs_subr.c
72
(int)fs->fs_fragshift);
usr.sbin/makefs/ffs/ffs_subr.c
80
ffs_clrblock(struct fs *fs, u_char *cp, int32_t h)
usr.sbin/makefs/ffs/ffs_subr.c
83
switch ((int)fs->fs_fragshift) {
usr.sbin/makefs/ffs/ffs_subr.c
98
(int)fs->fs_fragshift);
usr.sbin/makefs/ffs/mkfs.c
109
struct fs *
usr.sbin/makefs/ffs/mkfs.c
406
sblock.fs_sbsize = fragroundup(&sblock, sizeof(struct fs));
usr.sbin/makefs/ffs/mkfs.c
522
ffs_write_superblock(struct fs *fs, const fsinfo_t *fsopts)
usr.sbin/makefs/ffs/mkfs.c
525
struct fs *fsdup;
usr.sbin/makefs/ffs/mkfs.c
529
memcpy(writebuf, fs, SBLOCKSIZE);
usr.sbin/makefs/ffs/mkfs.c
531
fsdup = (struct fs *)writebuf;
usr.sbin/makefs/ffs/mkfs.c
535
ffs_wtfs(fs->fs_sblockloc / sectorsize, SBLOCKSIZE, writebuf, fsopts);
usr.sbin/makefs/ffs/mkfs.c
538
for (cylno = 0; cylno < fs->fs_ncg; cylno++)
usr.sbin/makefs/ffs/mkfs.c
539
ffs_wtfs(fsbtodb(fs, cgsblock(fs, cylno)),
usr.sbin/makefs/ffs/mkfs.c
543
size = fs->fs_cssize;
usr.sbin/makefs/ffs/mkfs.c
544
blks = howmany(size, fs->fs_fsize);
usr.sbin/makefs/ffs/mkfs.c
545
space = (void *)fs->fs_csp;
usr.sbin/makefs/ffs/mkfs.c
547
for (i = 0; i < blks; i+= fs->fs_frag) {
usr.sbin/makefs/ffs/mkfs.c
548
size = fs->fs_bsize;
usr.sbin/makefs/ffs/mkfs.c
549
if (i + fs->fs_frag > blks)
usr.sbin/makefs/ffs/mkfs.c
550
size = (blks - i) * fs->fs_fsize;
usr.sbin/makefs/ffs/mkfs.c
552
ffs_wtfs(fsbtodb(fs, fs->fs_csaddr + i), size, wrbuf, fsopts);
usr.sbin/makefs/ffs/mkfs.c
76
struct fs fs;
usr.sbin/makefs/ffs/mkfs.c
79
#define sblock fsun.fs
usr.sbin/makefs/ffs/newfs_extern.h
30
struct fs *ffs_mkfs(const char *, const fsinfo_t *, time_t);
usr.sbin/makefs/ffs/newfs_extern.h
31
void ffs_write_superblock(struct fs *, const fsinfo_t *);
usr.sbin/makefs/ffs/ufs_inode.h
49
struct fs *i_fs; /* File system */
usr.sbin/makefs/makefs.h
168
#define DECLARE_FUN(fs) \
usr.sbin/makefs/makefs.h
169
void fs ## _prep_opts(fsinfo_t *); \
usr.sbin/makefs/makefs.h
170
int fs ## _parse_opts(const char *, fsinfo_t *); \
usr.sbin/makefs/makefs.h
171
void fs ## _cleanup_opts(fsinfo_t *); \
usr.sbin/makefs/makefs.h
172
void fs ## _makefs(const char *, const char *, fsnode *, fsinfo_t *)
usr.sbin/makefs/msdos.c
147
vp.fs = fsopts;
usr.sbin/ospf6d/kroute.c
109
kr_init(int fs, u_int rdomain, int redis_label_or_prefix, u_int8_t fib_prio)
usr.sbin/ospf6d/kroute.c
116
kr_state.fib_sync = fs;
usr.sbin/ospfd/kroute.c
131
kr_init(int fs, u_int rdomain, int redis_label_or_prefix, u_int8_t fib_prio)
usr.sbin/ospfd/kroute.c
138
kr_state.fib_sync = fs;
usr.sbin/quot/quot.c
132
#define actualblocks(fs, ip) DIP(fs, dp, di_blocks)
usr.sbin/quot/quot.c
135
virtualblocks(struct fs *super, union dinode *dp)
usr.sbin/quot/quot.c
157
isfree(struct fs *super, union dinode *dp)
usr.sbin/quot/quot.c
313
dofsizes(int fd, struct fs *super, char *name)
usr.sbin/quot/quot.c
366
douser(int fd, struct fs *super, char *name)
usr.sbin/quot/quot.c
407
donames(int fd, struct fs *super, char *name)
usr.sbin/quot/quot.c
470
ffs_oldfscompat(struct fs *fs)
usr.sbin/quot/quot.c
474
fs->fs_npsect = max(fs->fs_npsect, fs->fs_nsect); /* XXX */
usr.sbin/quot/quot.c
475
fs->fs_interleave = max(fs->fs_interleave, 1); /* XXX */
usr.sbin/quot/quot.c
476
if (fs->fs_postblformat == FS_42POSTBLFMT) /* XXX */
usr.sbin/quot/quot.c
477
fs->fs_nrpos = 8; /* XXX */
usr.sbin/quot/quot.c
478
if (fs->fs_inodefmt < FS_44INODEFMT) { /* XXX */
usr.sbin/quot/quot.c
479
quad_t sizepb = fs->fs_bsize; /* XXX */
usr.sbin/quot/quot.c
481
fs->fs_maxfilesize = fs->fs_bsize * NDADDR - 1; /* XXX */
usr.sbin/quot/quot.c
483
sizepb *= NINDIR(fs); /* XXX */
usr.sbin/quot/quot.c
484
fs->fs_maxfilesize += sizepb; /* XXX */
usr.sbin/quot/quot.c
486
fs->fs_qbmask = ~fs->fs_bmask; /* XXX */
usr.sbin/quot/quot.c
487
fs->fs_qfmask = ~fs->fs_fmask; /* XXX */
usr.sbin/quot/quot.c
495
struct fs *fs;
usr.sbin/quot/quot.c
517
fs = (struct fs *)superblock;
usr.sbin/quot/quot.c
518
if ((fs->fs_magic == FS_UFS1_MAGIC ||
usr.sbin/quot/quot.c
519
(fs->fs_magic == FS_UFS2_MAGIC &&
usr.sbin/quot/quot.c
520
fs->fs_sblockloc == sblock_try[i])) &&
usr.sbin/quot/quot.c
521
fs->fs_bsize <= MAXBSIZE &&
usr.sbin/quot/quot.c
522
fs->fs_bsize >= sizeof(struct fs))
usr.sbin/quot/quot.c
530
ffs_oldfscompat(fs);
usr.sbin/quot/quot.c
535
(*func)(fd, fs, name);
usr.sbin/quot/quot.c
54
static void (*func)(int, struct fs *, char *);
usr.sbin/quot/quot.c
63
#define INOCNT(fs) ((fs)->fs_ipg)
usr.sbin/quot/quot.c
64
#define INOSZ(fs) (((fs)->fs_magic == FS_UFS1_MAGIC ? \
usr.sbin/quot/quot.c
66
sizeof(struct ufs2_dinode)) * INOCNT(fs))
usr.sbin/quot/quot.c
72
#define DIP(fs, dp, field) \
usr.sbin/quot/quot.c
73
(((fs)->fs_magic == FS_UFS1_MAGIC) ? \
usr.sbin/quot/quot.c
77
get_inode(int fd, struct fs *super, ino_t ino)
usr.sbin/quotaon/quotaon.c
108
while ((fs = getfsent()) != NULL) {
usr.sbin/quotaon/quotaon.c
109
if (strcmp(fs->fs_type, FSTAB_RW))
usr.sbin/quotaon/quotaon.c
111
if (strcmp(fs->fs_vfstype, "ffs") &&
usr.sbin/quotaon/quotaon.c
112
strcmp(fs->fs_vfstype, "ufs") &&
usr.sbin/quotaon/quotaon.c
113
strcmp(fs->fs_vfstype, "mfs"))
usr.sbin/quotaon/quotaon.c
116
if (gflag && hasquota(fs, GRPQUOTA, &qfnp, 0))
usr.sbin/quotaon/quotaon.c
117
errs += quotaonoff(fs, offmode, GRPQUOTA, qfnp);
usr.sbin/quotaon/quotaon.c
118
if (uflag && hasquota(fs, USRQUOTA, &qfnp, 0))
usr.sbin/quotaon/quotaon.c
119
errs += quotaonoff(fs, offmode, USRQUOTA, qfnp);
usr.sbin/quotaon/quotaon.c
122
if ((argnum = oneof(fs->fs_file, argv, argc)) >= 0 ||
usr.sbin/quotaon/quotaon.c
123
(argnum = oneof(fs->fs_spec, argv, argc)) >= 0) {
usr.sbin/quotaon/quotaon.c
126
hasquota(fs, GRPQUOTA, &qfnp, 1);
usr.sbin/quotaon/quotaon.c
127
errs += quotaonoff(fs, offmode, GRPQUOTA, qfnp);
usr.sbin/quotaon/quotaon.c
130
hasquota(fs, USRQUOTA, &qfnp, 1);
usr.sbin/quotaon/quotaon.c
131
errs += quotaonoff(fs, offmode, USRQUOTA, qfnp);
usr.sbin/quotaon/quotaon.c
152
quotaonoff(struct fstab *fs, int offmode, int type, char *qfpathname)
usr.sbin/quotaon/quotaon.c
154
if (strcmp(fs->fs_file, "/") && readonly(fs))
usr.sbin/quotaon/quotaon.c
157
if (quotactl(fs->fs_file, QCMD(Q_QUOTAOFF, type), 0, 0) < 0) {
usr.sbin/quotaon/quotaon.c
159
perror(fs->fs_file);
usr.sbin/quotaon/quotaon.c
163
printf("%s: %s quotas turned off\n", fs->fs_file,
usr.sbin/quotaon/quotaon.c
167
if (quotactl(fs->fs_file, QCMD(Q_QUOTAON, type), 0, qfpathname) < 0) {
usr.sbin/quotaon/quotaon.c
168
warn("%s: %s quotas using %s", fs->fs_file,
usr.sbin/quotaon/quotaon.c
173
printf("%s: %s quotas turned on\n", fs->fs_file,
usr.sbin/quotaon/quotaon.c
196
hasquota(struct fstab *fs, int type, char **qfnamep, int force)
usr.sbin/quotaon/quotaon.c
210
strlcpy(buf, fs->fs_mntops, sizeof buf);
usr.sbin/quotaon/quotaon.c
225
(void) snprintf(buf, sizeof buf, "%s/%s.%s", fs->fs_file,
usr.sbin/quotaon/quotaon.c
236
readonly(struct fstab *fs)
usr.sbin/quotaon/quotaon.c
240
if (statfs(fs->fs_file, &fsbuf) < 0 ||
usr.sbin/quotaon/quotaon.c
241
strcmp(fsbuf.f_mntonname, fs->fs_file) ||
usr.sbin/quotaon/quotaon.c
242
strcmp(fsbuf.f_mntfromname, fs->fs_spec)) {
usr.sbin/quotaon/quotaon.c
243
if (strcmp(fs->fs_file, "mfs") ||
usr.sbin/quotaon/quotaon.c
247
printf("%s: not mounted\n", fs->fs_file);
usr.sbin/quotaon/quotaon.c
252
printf("%s: mounted read-only\n", fs->fs_file);
usr.sbin/quotaon/quotaon.c
56
int hasquota(struct fstab *fs, int type, char **qfnamep, int force);
usr.sbin/quotaon/quotaon.c
57
int quotaonoff(struct fstab *fs, int offmode, int type, char *qfpathname);
usr.sbin/quotaon/quotaon.c
59
int readonly(struct fstab *fs);
usr.sbin/quotaon/quotaon.c
65
struct fstab *fs;
usr.sbin/rdsetroot/rdsetroot.c
45
char *dataseg, *kernel = NULL, *fs = NULL, *name;
usr.sbin/rdsetroot/rdsetroot.c
77
fs = argv[1];
usr.sbin/rdsetroot/rdsetroot.c
84
if (fs) {
usr.sbin/rdsetroot/rdsetroot.c
86
fsfd = open(fs, O_RDWR | O_CREAT | O_TRUNC, 0644);
usr.sbin/rdsetroot/rdsetroot.c
88
fsfd = open(fs, O_RDONLY);
usr.sbin/rdsetroot/rdsetroot.c
96
err(1, "%s", fs);
usr.sbin/repquota/repquota.c
123
while ((fs = getfsent()) != NULL) {
usr.sbin/repquota/repquota.c
124
if (strcmp(fs->fs_vfstype, "ffs") &&
usr.sbin/repquota/repquota.c
125
strcmp(fs->fs_vfstype, "ufs") &&
usr.sbin/repquota/repquota.c
126
strcmp(fs->fs_vfstype, "mfs"))
usr.sbin/repquota/repquota.c
129
if (gflag && hasquota(fs, GRPQUOTA, &qfnp))
usr.sbin/repquota/repquota.c
130
errs += repquota(fs, GRPQUOTA, qfnp);
usr.sbin/repquota/repquota.c
131
if (uflag && hasquota(fs, USRQUOTA, &qfnp))
usr.sbin/repquota/repquota.c
132
errs += repquota(fs, USRQUOTA, qfnp);
usr.sbin/repquota/repquota.c
135
if ((argnum = oneof(fs->fs_file, argv, argc)) >= 0 ||
usr.sbin/repquota/repquota.c
136
(argnum = oneof(fs->fs_spec, argv, argc)) >= 0) {
usr.sbin/repquota/repquota.c
138
if (gflag && hasquota(fs, GRPQUOTA, &qfnp))
usr.sbin/repquota/repquota.c
139
errs += repquota(fs, GRPQUOTA, qfnp);
usr.sbin/repquota/repquota.c
140
if (uflag && hasquota(fs, USRQUOTA, &qfnp))
usr.sbin/repquota/repquota.c
141
errs += repquota(fs, USRQUOTA, qfnp);
usr.sbin/repquota/repquota.c
160
repquota(struct fstab *fs, int type, char *qfpathname)
usr.sbin/repquota/repquota.c
171
if (quotactl(fs->fs_file, QCMD(Q_SYNC, type), 0, 0) < 0 &&
usr.sbin/repquota/repquota.c
181
qfextension[type], fs->fs_file, fs->fs_spec);
usr.sbin/repquota/repquota.c
255
hasquota(struct fstab *fs, int type, char **qfnamep)
usr.sbin/repquota/repquota.c
269
strlcpy(buf, fs->fs_mntops, sizeof buf);
usr.sbin/repquota/repquota.c
285
fs->fs_file, qfname, qfextension[type]);
usr.sbin/repquota/repquota.c
75
struct fstab *fs;
usr.sbin/ripd/kroute.c
112
kr_init(int fs, u_int rdomain, u_int8_t fib_prio)
usr.sbin/ripd/kroute.c
153
kr_state.fib_sync = fs; /* now set correct sync mode */
usr.sbin/rpki-client/main.c
956
struct statvfs fs;
usr.sbin/rpki-client/main.c
960
if (fstatvfs(fd, &fs) == -1)
usr.sbin/rpki-client/main.c
963
if (fs.f_bavail < minsize / fs.f_frsize ||
usr.sbin/rpki-client/main.c
964
(fs.f_ffree > 0 && fs.f_favail < minnode)) {
usr.sbin/rpki-client/main.c
970
(unsigned long long)fs.f_bavail * fs.f_frsize / 1024,
usr.sbin/rpki-client/main.c
974
(unsigned long long)fs.f_favail, minnode);
usr.sbin/smtpd/lka_filter.c
1247
filter_builtins_notimpl(struct filter_session *fs, struct filter *filter, uint64_t reqid, const char *param)
usr.sbin/smtpd/lka_filter.c
1253
filter_builtins_global(struct filter_session *fs, struct filter *filter, uint64_t reqid)
usr.sbin/smtpd/lka_filter.c
1255
return filter_check_fcrdns(filter, fs->fcrdns) ||
usr.sbin/smtpd/lka_filter.c
1256
filter_check_rdns(filter, fs->rdns) ||
usr.sbin/smtpd/lka_filter.c
1257
filter_check_rdns_table(filter, K_DOMAIN, fs->rdns) ||
usr.sbin/smtpd/lka_filter.c
1258
filter_check_rdns_regex(filter, fs->rdns) ||
usr.sbin/smtpd/lka_filter.c
1259
filter_check_src_table(filter, K_NETADDR, ss_to_text(&fs->ss_src)) ||
usr.sbin/smtpd/lka_filter.c
1260
filter_check_src_regex(filter, ss_to_text(&fs->ss_src)) ||
usr.sbin/smtpd/lka_filter.c
1261
filter_check_helo_table(filter, K_DOMAIN, fs->helo) ||
usr.sbin/smtpd/lka_filter.c
1262
filter_check_helo_regex(filter, fs->helo) ||
usr.sbin/smtpd/lka_filter.c
1263
filter_check_auth(filter, fs->username) ||
usr.sbin/smtpd/lka_filter.c
1264
filter_check_auth_table(filter, K_STRING, fs->username) ||
usr.sbin/smtpd/lka_filter.c
1265
filter_check_auth_table(filter, K_CREDENTIALS, fs->username) ||
usr.sbin/smtpd/lka_filter.c
1266
filter_check_auth_regex(filter, fs->username) ||
usr.sbin/smtpd/lka_filter.c
1267
filter_check_mail_from_table(filter, K_MAILADDR, fs->mail_from) ||
usr.sbin/smtpd/lka_filter.c
1268
filter_check_mail_from_regex(filter, fs->mail_from);
usr.sbin/smtpd/lka_filter.c
1272
filter_builtins_connect(struct filter_session *fs, struct filter *filter, uint64_t reqid, const char *param)
usr.sbin/smtpd/lka_filter.c
1274
return filter_builtins_global(fs, filter, reqid);
usr.sbin/smtpd/lka_filter.c
1278
filter_builtins_helo(struct filter_session *fs, struct filter *filter, uint64_t reqid, const char *param)
usr.sbin/smtpd/lka_filter.c
1280
return filter_builtins_global(fs, filter, reqid);
usr.sbin/smtpd/lka_filter.c
1284
filter_builtins_mail_from(struct filter_session *fs, struct filter *filter, uint64_t reqid, const char *param)
usr.sbin/smtpd/lka_filter.c
1286
return filter_builtins_global(fs, filter, reqid);
usr.sbin/smtpd/lka_filter.c
1290
filter_builtins_rcpt_to(struct filter_session *fs, struct filter *filter, uint64_t reqid, const char *param)
usr.sbin/smtpd/lka_filter.c
1292
return filter_builtins_global(fs, filter, reqid) ||
usr.sbin/smtpd/lka_filter.c
1298
filter_builtins_data(struct filter_session *fs, struct filter *filter, uint64_t reqid, const char *param)
usr.sbin/smtpd/lka_filter.c
1300
return filter_builtins_global(fs, filter, reqid);
usr.sbin/smtpd/lka_filter.c
1304
filter_builtins_commit(struct filter_session *fs, struct filter *filter, uint64_t reqid, const char *param)
usr.sbin/smtpd/lka_filter.c
1306
return filter_builtins_global(fs, filter, reqid);
usr.sbin/smtpd/lka_filter.c
1416
struct filter_session *fs;
usr.sbin/smtpd/lka_filter.c
1453
fs = tree_xget(&sessions, reqid);
usr.sbin/smtpd/lka_filter.c
1454
fs->rdns = xstrdup(rdns);
usr.sbin/smtpd/lka_filter.c
1455
fs->fcrdns = fcrdns;
usr.sbin/smtpd/lka_filter.c
1456
fs->ss_src = *ss_src;
usr.sbin/smtpd/lka_filter.c
1457
fs->ss_dest = *ss_dest;
usr.sbin/smtpd/lka_filter.c
1481
struct filter_session *fs;
usr.sbin/smtpd/lka_filter.c
1484
fs = tree_xget(&sessions, reqid);
usr.sbin/smtpd/lka_filter.c
1485
fs->username = xstrdup(username);
usr.sbin/smtpd/lka_filter.c
501
struct filter_session *fs;
usr.sbin/smtpd/lka_filter.c
505
if ((fs = tree_get(&sessions, reqid)) == NULL)
usr.sbin/smtpd/lka_filter.c
508
filter = dict_get(&filters, fs->filter_name);
usr.sbin/smtpd/lka_filter.c
526
struct filter_session *fs;
usr.sbin/smtpd/lka_filter.c
533
fs = xcalloc(1, sizeof (struct filter_session));
usr.sbin/smtpd/lka_filter.c
534
fs->id = reqid;
usr.sbin/smtpd/lka_filter.c
535
fs->filter_name = xstrdup(filter_name);
usr.sbin/smtpd/lka_filter.c
536
tree_xset(&sessions, fs->id, fs);
usr.sbin/smtpd/lka_filter.c
544
struct filter_session *fs;
usr.sbin/smtpd/lka_filter.c
546
fs = tree_xpop(&sessions, reqid);
usr.sbin/smtpd/lka_filter.c
547
free(fs->rdns);
usr.sbin/smtpd/lka_filter.c
548
free(fs->helo);
usr.sbin/smtpd/lka_filter.c
549
free(fs->mail_from);
usr.sbin/smtpd/lka_filter.c
550
free(fs->username);
usr.sbin/smtpd/lka_filter.c
551
free(fs->lastparam);
usr.sbin/smtpd/lka_filter.c
552
free(fs->filter_name);
usr.sbin/smtpd/lka_filter.c
553
free(fs);
usr.sbin/smtpd/lka_filter.c
560
struct filter_session *fs;
usr.sbin/smtpd/lka_filter.c
564
fs = tree_xget(&sessions, reqid);
usr.sbin/smtpd/lka_filter.c
571
fs->io = io_new();
usr.sbin/smtpd/lka_filter.c
572
io_set_fd(fs->io, sp[1]);
usr.sbin/smtpd/lka_filter.c
573
io_set_callback(fs->io, filter_session_io, fs);
usr.sbin/smtpd/lka_filter.c
586
struct filter_session *fs;
usr.sbin/smtpd/lka_filter.c
588
fs = tree_xget(&sessions, reqid);
usr.sbin/smtpd/lka_filter.c
589
if (fs->io) {
usr.sbin/smtpd/lka_filter.c
590
io_free(fs->io);
usr.sbin/smtpd/lka_filter.c
591
fs->io = NULL;
usr.sbin/smtpd/lka_filter.c
599
struct filter_session *fs = arg;
usr.sbin/smtpd/lka_filter.c
603
log_trace(TRACE_IO, "filter session: %p: %s %s", fs, io_strevent(evt),
usr.sbin/smtpd/lka_filter.c
609
line = io_getline(fs->io, &len);
usr.sbin/smtpd/lka_filter.c
614
filter_data(fs->id, line);
usr.sbin/smtpd/lka_filter.c
630
struct filter_session *fs;
usr.sbin/smtpd/lka_filter.c
655
if ((fs = tree_get(&sessions, reqid)) == NULL)
usr.sbin/smtpd/lka_filter.c
659
if (fs->phase != FILTER_DATA_LINE)
usr.sbin/smtpd/lka_filter.c
664
if (fs->phase == FILTER_DATA_LINE)
usr.sbin/smtpd/lka_filter.c
674
if (fs->phase == FILTER_COMMIT)
usr.sbin/smtpd/lka_filter.c
702
filter_protocol_internal(struct filter_session *fs, uint64_t *token, uint64_t reqid, enum filter_phase phase, const char *param)
usr.sbin/smtpd/lka_filter.c
712
fs->phase = phase;
usr.sbin/smtpd/lka_filter.c
717
phase = fs->phase;
usr.sbin/smtpd/lka_filter.c
718
if (fs->phase != phase)
usr.sbin/smtpd/lka_filter.c
722
filter_chain = dict_get(&filter_chains, fs->filter_name);
usr.sbin/smtpd/lka_filter.c
723
filter_entry = TAILQ_FIRST(&filter_chain->chain[fs->phase]);
usr.sbin/smtpd/lka_filter.c
725
TAILQ_FOREACH(filter_entry, &filter_chain->chain[fs->phase], entries)
usr.sbin/smtpd/lka_filter.c
737
fs->id, phase_name, resume ? "y" : "n");
usr.sbin/smtpd/lka_filter.c
748
fs->id, phase_name, resume ? "y" : "n",
usr.sbin/smtpd/lka_filter.c
751
filter_execs[fs->phase].phase_name, param);
usr.sbin/smtpd/lka_filter.c
755
if (filter_execs[fs->phase].func(fs, filter, reqid, param)) {
usr.sbin/smtpd/lka_filter.c
759
fs->id, phase_name, resume ? "y" : "n",
usr.sbin/smtpd/lka_filter.c
769
fs->id, phase_name, resume ? "y" : "n",
usr.sbin/smtpd/lka_filter.c
779
fs->id, phase_name, resume ? "y" : "n",
usr.sbin/smtpd/lka_filter.c
787
fs->id, phase_name, resume ? "y" : "n",
usr.sbin/smtpd/lka_filter.c
792
lka_report_filter_report(fs->id, filter->name, 1,
usr.sbin/smtpd/lka_filter.c
797
fs->id, phase_name, resume ? "y" : "n",
usr.sbin/smtpd/lka_filter.c
805
fs->id, phase_name, resume ? "y" : "n",
usr.sbin/smtpd/lka_filter.c
816
fs->id, phase_name, resume ? "y" : "n",
usr.sbin/smtpd/lka_filter.c
821
filter_protocol_internal(fs, token, reqid, phase, param);
usr.sbin/smtpd/lka_filter.c
826
filter_data_internal(struct filter_session *fs, uint64_t token, uint64_t reqid, const char *line)
usr.sbin/smtpd/lka_filter.c
833
fs->phase = FILTER_DATA_LINE;
usr.sbin/smtpd/lka_filter.c
834
if (fs->phase != FILTER_DATA_LINE)
usr.sbin/smtpd/lka_filter.c
838
filter_chain = dict_get(&filter_chains, fs->filter_name);
usr.sbin/smtpd/lka_filter.c
839
filter_entry = TAILQ_FIRST(&filter_chain->chain[fs->phase]);
usr.sbin/smtpd/lka_filter.c
841
TAILQ_FOREACH(filter_entry, &filter_chain->chain[fs->phase], entries)
usr.sbin/smtpd/lka_filter.c
851
io_printf(fs->io, "%s\n", line);
usr.sbin/smtpd/lka_filter.c
863
struct filter_session *fs;
usr.sbin/smtpd/lka_filter.c
867
fs = tree_xget(&sessions, reqid);
usr.sbin/smtpd/lka_filter.c
872
free(fs->helo);
usr.sbin/smtpd/lka_filter.c
873
fs->helo = xstrdup(param);
usr.sbin/smtpd/lka_filter.c
876
free(fs->mail_from);
usr.sbin/smtpd/lka_filter.c
877
fs->mail_from = xstrdup(param + 1);
usr.sbin/smtpd/lka_filter.c
878
*strchr(fs->mail_from, '>') = '\0';
usr.sbin/smtpd/lka_filter.c
879
param = fs->mail_from;
usr.sbin/smtpd/lka_filter.c
894
free(fs->lastparam);
usr.sbin/smtpd/lka_filter.c
895
fs->lastparam = xstrdup(param);
usr.sbin/smtpd/lka_filter.c
897
filter_protocol_internal(fs, &token, reqid, phase, param);
usr.sbin/smtpd/lka_filter.c
905
struct filter_session *fs;
usr.sbin/smtpd/lka_filter.c
908
if ((fs = tree_get(&sessions, reqid)) == NULL)
usr.sbin/smtpd/lka_filter.c
911
filter_protocol_internal(fs, &token, reqid, phase, fs->lastparam);
usr.sbin/smtpd/lka_filter.c
917
struct filter_session *fs;
usr.sbin/smtpd/lka_filter.c
919
fs = tree_xget(&sessions, reqid);
usr.sbin/smtpd/lka_filter.c
921
filter_data_internal(fs, 0, reqid, line);
usr.sbin/smtpd/lka_filter.c
927
struct filter_session *fs;
usr.sbin/smtpd/lka_filter.c
930
if ((fs = tree_get(&sessions, reqid)) == NULL)
usr.sbin/smtpd/lka_filter.c
933
filter_data_internal(fs, token, reqid, line);
usr.sbin/smtpd/lka_filter.c
940
struct filter_session *fs;
usr.sbin/smtpd/lka_filter.c
945
fs = tree_xget(&sessions, reqid);
usr.sbin/smtpd/lka_filter.c
951
phase, reqid, token, fs->rdns, param);