Neuter linux_ustat() until somebody finds time to try to fix it.
The fundamental problem is that we get only the lower 8 bits of the minor device number so there is no guarantee that we can actually find the disk device in question at all. This was probably a bigger issue pre-GEOM where the upper bits signaled which slice were in use. The secondary problem is how we get from (partial) dev_t to vnode. The correct implementation will involve traversing the mount list looking for a perfect match or a possible match (for truncated minor).
This commit is contained in:
parent
4a55012553
commit
5bbf7f6810
@ -285,16 +285,20 @@ struct l_ustat
|
||||
int
|
||||
linux_ustat(struct thread *td, struct linux_ustat_args *args)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
if (ldebug(ustat))
|
||||
printf(ARGS(ustat, "%d, *"), args->dev);
|
||||
#endif
|
||||
|
||||
return (EOPNOTSUPP);
|
||||
|
||||
#ifdef not_that_way
|
||||
struct l_ustat lu;
|
||||
struct cdev *dev;
|
||||
struct vnode *vp;
|
||||
struct statfs *stat;
|
||||
int error;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (ldebug(ustat))
|
||||
printf(ARGS(ustat, "%d, *"), args->dev);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* lu.f_fname and lu.f_fpack are not used. They are always zeroed.
|
||||
@ -334,6 +338,7 @@ linux_ustat(struct thread *td, struct linux_ustat_args *args)
|
||||
}
|
||||
|
||||
return (copyout(&lu, args->ubuf, sizeof(lu)));
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
|
||||
|
Loading…
Reference in New Issue
Block a user