Fix size confusion with lfs_fhandle - and as it now turns out to be the same
as the lfs compat_30_fhandle, g/c the latter. Add an alias for the LFCNIFILEFH fcntl, so that binaries compiled in the meantime (with too large lfs_fhandle) continue to work. This makes vfs_cleanerd work again after the kernel checks filehandle size more strictly (problem reported by Kurt Schreiner on current-users).
This commit is contained in:
parent
f1c3aa8a63
commit
12cf319c62
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lfs.h,v 1.112 2006/07/31 16:34:44 martin Exp $ */
|
||||
/* $NetBSD: lfs.h,v 1.113 2006/08/06 12:34:12 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
|
||||
@ -1083,10 +1083,7 @@ struct lfs_fcntl_markv {
|
||||
#define LFCNRECLAIM _FCNO_FSPRIV('L', 4)
|
||||
|
||||
struct lfs_fhandle {
|
||||
char space[32];
|
||||
};
|
||||
struct lfs_compat_30_fhandle {
|
||||
char space[24];
|
||||
char space[28]; /* FHANDLE_SIZE_COMPAT (but used from userland too) */
|
||||
};
|
||||
#define LFCNREWIND _FCNR_FSPRIV('L', 6, int)
|
||||
#define LFCNINVAL _FCNR_FSPRIV('L', 7, int)
|
||||
@ -1097,7 +1094,8 @@ struct lfs_compat_30_fhandle {
|
||||
/* Compat */
|
||||
#define LFCNSEGWAITALL_COMPAT _FCNW_FSPRIV('L', 0, struct timeval)
|
||||
#define LFCNSEGWAIT_COMPAT _FCNW_FSPRIV('L', 1, struct timeval)
|
||||
#define LFCNIFILEFH_COMPAT _FCNW_FSPRIV('L', 5, struct lfs_compat_30_fhandle)
|
||||
#define LFCNIFILEFH_COMPAT _FCNW_FSPRIV('L', 5, struct lfs_fhandle)
|
||||
#define LFCNIFILEFH_COMPAT2 _FCN_FSPRIV(F_FSOUT, 'L', 11, 32)
|
||||
#define LFCNWRAPSTOP_COMPAT _FCNO_FSPRIV('L', 9)
|
||||
#define LFCNWRAPGO_COMPAT _FCNO_FSPRIV('L', 10)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lfs_vnops.c,v 1.186 2006/07/31 16:34:45 martin Exp $ */
|
||||
/* $NetBSD: lfs_vnops.c,v 1.187 2006/08/06 12:34:12 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
|
||||
@ -67,7 +67,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.186 2006/07/31 16:34:45 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.187 2006/08/06 12:34:12 martin Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_compat_netbsd.h"
|
||||
@ -1507,6 +1507,7 @@ lfs_fcntl(void *v)
|
||||
return lfs_vptofh(fs->lfs_ivnode, &(fhp->fh_fid), &fh_size);
|
||||
#endif
|
||||
|
||||
case LFCNIFILEFH_COMPAT2:
|
||||
case LFCNIFILEFH:
|
||||
/* Return the filehandle of the Ifile */
|
||||
fhp = (struct fhandle *)ap->a_data;
|
||||
|
Loading…
Reference in New Issue
Block a user