* Copyright (c) 1991 The Regents of the University of California.
* %sccs.include.redist.c%
* @(#)ufs_vfsops.c 7.58 (Berkeley) %G%
#include <ufs/ufs/quota.h>
#include <ufs/ufs/inode.h>
#include <ufs/ufs/ufsmount.h>
#include <ufs/ufs/ufs_extern.h>
* Flag to permit forcible unmounting.
* Make a filesystem operational.
* Nothing to do at the moment.
error = closei(dev, IFBLK, fs->fs_ronly? FREAD : FREAD|FWRITE);
* Do operations associated with quotas
ufs_quotactl(mp
, cmds
, uid
, arg
, p
)
cmd
= cmds
>> SUBCMDSHIFT
;
if (uid
== p
->p_cred
->p_ruid
)
if (error
= suser(p
->p_ucred
, &p
->p_acflag
))
if ((u_int
)type
>= MAXQUOTAS
)
return (quotaon(p
, mp
, type
, arg
));
error
= quotaoff(p
, mp
, type
);
return (setquota(mp
, uid
, type
, arg
));
return (setuse(mp
, uid
, type
, arg
));
return (getquota(mp
, uid
, type
, arg
));
* Print out statistics on the current allocation of the buffer pool.
* Can be enabled to print out on every ``sync'' by setting "syncprt"
register struct buf
*bp
, *dp
;
int counts
[MAXBSIZE
/CLBYTES
+1];
static char *bname
[BQUEUES
] = { "LOCKED", "LRU", "AGE", "EMPTY" };
for (bp
= bfreelist
, i
= 0; bp
< &bfreelist
[BQUEUES
]; bp
++, i
++) {
for (j
= 0; j
<= MAXBSIZE
/CLBYTES
; j
++)
for (dp
= bp
->av_forw
; dp
!= bp
; dp
= dp
->av_forw
) {
counts
[dp
->b_bufsize
/CLBYTES
]++;
printf("%s: total-%d", bname
[i
], count
);
for (j
= 0; j
<= MAXBSIZE
/CLBYTES
; j
++)
printf(", %d-%d", j
* CLBYTES
, counts
[j
]);