From owner-svn-src-projects@freebsd.org Sun Jun 3 00:42:37 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33A22FDCD45 for ; Sun, 3 Jun 2018 00:42:37 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DC94383CD5; Sun, 3 Jun 2018 00:42:36 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BDBD61750F; Sun, 3 Jun 2018 00:42:36 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w530gafj004670; Sun, 3 Jun 2018 00:42:36 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w530gamN004669; Sun, 3 Jun 2018 00:42:36 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806030042.w530gamN004669@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 3 Jun 2018 00:42:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334548 - projects/pnfs-planb-server/usr.bin/pnfsdscopymr X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server/usr.bin/pnfsdscopymr X-SVN-Commit-Revision: 334548 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2018 00:42:37 -0000 Author: rmacklem Date: Sun Jun 3 00:42:36 2018 New Revision: 334548 URL: https://svnweb.freebsd.org/changeset/base/334548 Log: Update the pnfsdscopymr man page for recent changes related to the change to the distributed mirror model. Modified: projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.1 Modified: projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.1 ============================================================================== --- projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.1 Sat Jun 2 22:40:16 2018 (r334547) +++ projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.1 Sun Jun 3 00:42:36 2018 (r334548) @@ -24,65 +24,66 @@ .\" .\" $FreeBSD$ .\" -.Dd March 9, 2018 +.Dd June 2, 2018 .Dt PNFSDSCOPYMR 1 .Os .Sh NAME .Nm pnfsdscopymr .Nd -makes a copy of a file's data on a recovered/new mirror data storage server (DS) +copy or move a data storage file for a MDS file to a different DS .Sh SYNOPSIS .Nm -.Ar file -.Ar mounted_on_path_of_recovered_DS -.Ar mounted_on_path_of_operational_DS +.Op Fl r Ar mounted-on-DS-dir +.Op Fl m Ar source-mounted-on-DS-dir destination-mounted-on-DS-dir +.Ar mdsfile .Sh DESCRIPTION The .Nm -command copies a file's data from a operational DS to a recovered (or new) -DS that is configured as a mirror of this operational DS. -If the recovered/new DS is configured as a mirror of the operational DS, the -data of the -.Ar file -on the MDS -is copied to the recovered DS, unless the recovered/new DS -already has a valid copy. -The copy is considered valid if it exists in the extended attribute of the -MDS file and its IP address is non-zero. -If the -.Ar file -does not have the operational DS in its extended attribute or it already -has a valid copy of the file's data, the command simply does an exit(0). -This is done so that the command can be called on any file within the MDS's -exported file tree safely. +command copies a data storage file for an MDS file from one DS to another DS. +It is normally used to recover data files onto a repaired DS, but can also +be used to manually migrate a data storage file from one DS to a different one. +By default, the command will copy the data storage file for +``mdsfile'' +to one of the other DSs to create a mirror of it. +This might be done if the file was created before mirroring was enabled on +the pNFS service and now needs to be mirrored. .Pp -The first argument -.Ar file -is the file on the MDS, the second argument -.Ar mounted_on_path_of_recovered_DS -is the mounted on directory path of the recovered/new mirror and -the third argument -.Ar mounted_on_path_of_operational_DS -is the mounted on directory path of a non-disabled DS that is a mirror of the -recovered/new DS. -The third argument is used to check if the -.Ar file -argument is stored on the mirror set that includes the recovered/new DS -so that it can be used within a -.Xr find 1 . +The following options are available: +.Bl -tag -width Ds +.It Fl r Ar mounted-on-DS-dir +This option indicates that the data storage file should be created on the DS +that is mounted on the directory ``mounted-on-DS-dir''. +It will only do the copy if there is an entry in the pnfsd.dsfile extended +attribute that has an IP address of 0.0.0.0. +See +.Xr pnfsdsfile 1 +for how to do this. +This is normally done for all regular files via +.Xr find 1 +in order to recover the data +storage files onto a repaired DS. +.It Fl m Ar source-mounted-on-DS-dir destination-mounted-on-DS-dir +This option indicates that the data storage file is to be migrated from +the source DS mounted on the diectory ``source-mounted-on-DS-dir'' to +the DS mounted on the directory ``destination-mounted-on-DS-dir''. +In this case, the data storage file will be removed from the source DS +when the copy is completed. +.El +If the copy/migration is already done, the command will simply exit(0), +so that it can safely be used on all regular files in the exported directory +tree on the MDS. .Pp This command must be run on the MDS and a typical usage would be as an argument for .Xr find 1 for all regular files. .sp -For example, if the recovered/new DS is mounted on /data3 and it is a -mirror of the DS mounted on /data2: +For example, if the repaired DS is mounted on /data3 and files previously +stored on the repaired DS have had the DS's IP address set to 0.0.0.0: .br # cd .br -# find . -type f -exec pnfsdscopymr {} /data3 /data2 \\; -.El +# find . -type f -exec pnfsdscopymr -r /data3 {} \\; .Sh SEE ALSO .Xr find 1 , .Xr pnfsdsfile 1 , From owner-svn-src-projects@freebsd.org Sun Jun 3 13:54:23 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 539CEFD040A for ; Sun, 3 Jun 2018 13:54:23 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EDF5686A81; Sun, 3 Jun 2018 13:54:22 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D005A1F7FD; Sun, 3 Jun 2018 13:54:22 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w53DsMwY006135; Sun, 3 Jun 2018 13:54:22 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w53DsMZK006133; Sun, 3 Jun 2018 13:54:22 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806031354.w53DsMZK006133@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 3 Jun 2018 13:54:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334558 - projects/pnfs-planb-server/sys/fs/nfsserver X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server/sys/fs/nfsserver X-SVN-Commit-Revision: 334558 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2018 13:54:23 -0000 Author: rmacklem Date: Sun Jun 3 13:54:22 2018 New Revision: 334558 URL: https://svnweb.freebsd.org/changeset/base/334558 Log: Fix a couple of vnode locking cases found during testing with VFS_DEBUG_LOCKS. The removal of DS files was being done when the main thread held an exclusive lock on the directory instead of the taskqueue threads that did the VOP calls. I think this was safe, but DEBUG_VFS_LOCKS expects the thread doing the VOP calls to hold the lock. This patch makes the taskqueue threads acquire/release the vnode lock on the directory. There was also a case when a VOP_SETEXTATTR() would be done with a shared vnode lock. For this case, just avoid doing the vn_extattr_set() call. (It may be necessary to change this to doing it after a LK_UPGRADE in the future, it clients break because the pnfsd.dsattr extended attribute doesn't get updated, due to this.) Modified: projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c Modified: projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c Sun Jun 3 13:41:23 2018 (r334557) +++ projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c Sun Jun 3 13:54:22 2018 (r334558) @@ -285,7 +285,7 @@ nfsvno_getattr(struct vnode *vp, struct nfsvattr *nvap * server is not a pNFS one. */ gotattr = 0; - if (vp->v_type == VREG && (attrbitp == NULL || + if (vp->v_type == VREG && nfsrv_devidcnt > 0 && (attrbitp == NULL || (nd->nd_flag & ND_NFSV4) == 0 || NFSISSET_ATTRBIT(attrbitp, NFSATTRBIT_CHANGE) || NFSISSET_ATTRBIT(attrbitp, NFSATTRBIT_SIZE) || @@ -1211,7 +1211,7 @@ nfsvno_removesub(struct nameidata *ndp, int is_v4, str struct thread *p, struct nfsexstuff *exp) { struct vnode *vp, *dsdvp[NFSDEV_MAXMIRRORS]; - int error = 0, i, mirrorcnt; + int error = 0, mirrorcnt; char fname[PNFS_FILENAME_LEN + 1]; fhandle_t fh; @@ -1225,12 +1225,8 @@ nfsvno_removesub(struct nameidata *ndp, int is_v4, str nfsrv_pnfsremovesetup(vp, p, dsdvp, &mirrorcnt, fname, &fh); if (!error) error = VOP_REMOVE(ndp->ni_dvp, vp, &ndp->ni_cnd); - if (dsdvp[0] != NULL) { - if (error == 0) - nfsrv_pnfsremove(dsdvp, mirrorcnt, fname, &fh, p); - for (i = 0; i < mirrorcnt; i++) - NFSVOPUNLOCK(dsdvp[i], 0); - } + if (error == 0 && dsdvp[0] != NULL) + nfsrv_pnfsremove(dsdvp, mirrorcnt, fname, &fh, p); if (ndp->ni_dvp == vp) vrele(ndp->ni_dvp); else @@ -1291,7 +1287,7 @@ nfsvno_rename(struct nameidata *fromndp, struct nameid u_int32_t ndstat, u_int32_t ndflag, struct ucred *cred, struct thread *p) { struct vnode *fvp, *tvp, *tdvp, *dsdvp[NFSDEV_MAXMIRRORS]; - int error = 0, i, mirrorcnt; + int error = 0, mirrorcnt; char fname[PNFS_FILENAME_LEN + 1]; fhandle_t fh; @@ -1398,13 +1394,9 @@ out: * if the rename succeeded, the DS file for the tvp needs to be * removed. */ - if (dsdvp[0] != NULL) { - if (error == 0) { - nfsrv_pnfsremove(dsdvp, mirrorcnt, fname, &fh, p); - NFSD_DEBUG(4, "nfsvno_rename: pnfsremove\n"); - } - for (i = 0; i < mirrorcnt; i++) - NFSVOPUNLOCK(dsdvp[i], 0); + if (error == 0 && dsdvp[0] != NULL) { + nfsrv_pnfsremove(dsdvp, mirrorcnt, fname, &fh, p); + NFSD_DEBUG(4, "nfsvno_rename: pnfsremove\n"); } vrele(tondp->ni_startdir); @@ -4054,8 +4046,8 @@ nfsrv_pnfsremovesetup(struct vnode *vp, NFSPROC_T *p, buflen = 1024; buf = malloc(buflen, M_TEMP, M_WAITOK); /* Get the directory vnode for the DS mount and the file handle. */ - error = nfsrv_dsgetsockmnt(vp, LK_EXCLUSIVE, buf, &buflen, mirrorcntp, - p, dvpp, NULL, NULL, fname, NULL, NULL, NULL, NULL, NULL); + error = nfsrv_dsgetsockmnt(vp, 0, buf, &buflen, mirrorcntp, p, dvpp, + NULL, NULL, fname, NULL, NULL, NULL, NULL, NULL); free(buf, M_TEMP); if (error != 0) printf("pNFS: nfsrv_pnfsremovesetup getsockmnt=%d\n", error); @@ -4087,6 +4079,9 @@ nfsrv_dsremove(struct vnode *dvp, char *fname, struct u_long *hashp; int error; + error = NFSVOPLOCK(dvp, LK_EXCLUSIVE); + if (error != 0) + return (error); named.ni_cnd.cn_nameiop = DELETE; named.ni_cnd.cn_lkflags = LK_EXCLUSIVE | LK_RETRY; named.ni_cnd.cn_cred = tcred; @@ -4103,6 +4098,7 @@ nfsrv_dsremove(struct vnode *dvp, char *fname, struct error = VOP_REMOVE(dvp, nvp, &named.ni_cnd); vput(nvp); } + NFSVOPUNLOCK(dvp, 0); nfsvno_relpathbuf(&named); if (error != 0) printf("pNFS: nfsrv_pnfsremove failed=%d\n", error); @@ -4462,8 +4458,6 @@ nfsrv_dsgetsockmnt(struct vnode *vp, int lktype, char ASSERT_VOP_LOCKED(vp, "nfsrv_dsgetsockmnt vp"); *mirrorcntp = 1; tdvpp = dvpp; - if (lktype == 0) - lktype = LK_SHARED; if (nvpp != NULL) *nvpp = NULL; if (dvpp != NULL) @@ -4547,10 +4541,16 @@ nfsrv_dsgetsockmnt(struct vnode *vp, int lktype, char } NFSDDSUNLOCK(); if (fndds != NULL) { - if (dvpp != NULL || fhiszero != 0 || + dvp = fndds->nfsdev_dsdir[dsdir]; + if (lktype != 0 || fhiszero != 0 || (nvpp != NULL && *nvpp == NULL)) { - dvp = fndds->nfsdev_dsdir[dsdir]; - error = vn_lock(dvp, lktype); + if (fhiszero != 0) + error = vn_lock(dvp, + LK_EXCLUSIVE); + else if (lktype != 0) + error = vn_lock(dvp, lktype); + else + error = vn_lock(dvp, LK_SHARED); /* * If the file handle is all 0's, try to * do a Lookup against the DS to acquire @@ -4574,7 +4574,7 @@ nfsrv_dsgetsockmnt(struct vnode *vp, int lktype, char } else vput(nvp); } - if (error != 0 || dvpp == NULL) + if (error != 0 || lktype == 0) NFSVOPUNLOCK(dvp, 0); } } @@ -5345,7 +5345,17 @@ nfsrv_getattrdsrpc(fhandle_t *fhp, struct ucred *cred, error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL); - if (error == 0) { + /* + * We can only save the updated values in the extended + * attribute if the vp is exclusively locked. + * This should happen when any of the following operations + * occur on the vnode: + * Close, Delegreturn, LayoutCommit, LayoutReturn + * As such, the updated extended attribute should get saved + * before nfsrv_checkdsattr() returns 0 and allows the cached + * attributes to be returned without calling this function. + */ + if (error == 0 && VOP_ISLOCKED(vp) == LK_EXCLUSIVE) { error = nfsrv_setextattr(vp, nap, p); NFSD_DEBUG(4, "nfsrv_getattrdsrpc: aft setextat=%d\n", error); Modified: projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c Sun Jun 3 13:41:23 2018 (r334557) +++ projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c Sun Jun 3 13:54:22 2018 (r334558) @@ -8310,9 +8310,8 @@ nfsrv_mdscopymr(char *mdspathp, char *dspathp, char *c * on the MDS file (as checked via the nmp argument), * nfsrv_dsgetsockmnt() returns EEXIST, so no copying will occur. */ - error = nfsrv_dsgetsockmnt(vp, LK_EXCLUSIVE, buf, buflenp, - &mirrorcnt, p, NULL, NULL, NULL, fname, nvpp, &nmp, curnmp, - &ippos, &dsdir); + error = nfsrv_dsgetsockmnt(vp, 0, buf, buflenp, &mirrorcnt, p, + NULL, NULL, NULL, fname, nvpp, &nmp, curnmp, &ippos, &dsdir); if (curvp != NULL) vput(curvp); if (nd.ni_vp == NULL) { From owner-svn-src-projects@freebsd.org Sun Jun 3 14:32:39 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52DB2FDB303 for ; Sun, 3 Jun 2018 14:32:39 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 080576878B; Sun, 3 Jun 2018 14:32:39 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DDC301FE73; Sun, 3 Jun 2018 14:32:38 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w53EWcmU026380; Sun, 3 Jun 2018 14:32:38 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w53EWcCb026379; Sun, 3 Jun 2018 14:32:38 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806031432.w53EWcCb026379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 3 Jun 2018 14:32:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334561 - projects/pnfs-planb-server/usr.bin/pnfsdscopymr X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server/usr.bin/pnfsdscopymr X-SVN-Commit-Revision: 334561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2018 14:32:39 -0000 Author: rmacklem Date: Sun Jun 3 14:32:38 2018 New Revision: 334561 URL: https://svnweb.freebsd.org/changeset/base/334561 Log: Use the .Dq macro for quoting. Not a content change. Reported by: bjk Modified: projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.1 Modified: projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.1 ============================================================================== --- projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.1 Sun Jun 3 14:13:11 2018 (r334560) +++ projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.1 Sun Jun 3 14:32:38 2018 (r334561) @@ -43,7 +43,7 @@ command copies a data storage file for an MDS file fro It is normally used to recover data files onto a repaired DS, but can also be used to manually migrate a data storage file from one DS to a different one. By default, the command will copy the data storage file for -``mdsfile'' +.Dq mdsfile to one of the other DSs to create a mirror of it. This might be done if the file was created before mirroring was enabled on the pNFS service and now needs to be mirrored. @@ -52,7 +52,8 @@ The following options are available: .Bl -tag -width Ds .It Fl r Ar mounted-on-DS-dir This option indicates that the data storage file should be created on the DS -that is mounted on the directory ``mounted-on-DS-dir''. +that is mounted on the directory +.Dq mounted-on-DS-dir . It will only do the copy if there is an entry in the pnfsd.dsfile extended attribute that has an IP address of 0.0.0.0. See @@ -64,8 +65,10 @@ in order to recover the data storage files onto a repaired DS. .It Fl m Ar source-mounted-on-DS-dir destination-mounted-on-DS-dir This option indicates that the data storage file is to be migrated from -the source DS mounted on the diectory ``source-mounted-on-DS-dir'' to -the DS mounted on the directory ``destination-mounted-on-DS-dir''. +the source DS mounted on the diectory +.Dq source-mounted-on-DS-dir +to the DS mounted on the directory +.Dq destination-mounted-on-DS-dir . In this case, the data storage file will be removed from the source DS when the copy is completed. .El From owner-svn-src-projects@freebsd.org Sun Jun 3 17:49:46 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 419F9FE549C for ; Sun, 3 Jun 2018 17:49:46 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EC65F71772; Sun, 3 Jun 2018 17:49:45 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CAA6521D1E; Sun, 3 Jun 2018 17:49:45 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w53Hnjoj021749; Sun, 3 Jun 2018 17:49:45 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w53HnjR8021748; Sun, 3 Jun 2018 17:49:45 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806031749.w53HnjR8021748@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 3 Jun 2018 17:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334573 - projects/pnfs-planb-server/usr.bin/pnfsdskill X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server/usr.bin/pnfsdskill X-SVN-Commit-Revision: 334573 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2018 17:49:46 -0000 Author: rmacklem Date: Sun Jun 3 17:49:45 2018 New Revision: 334573 URL: https://svnweb.freebsd.org/changeset/base/334573 Log: Update the pnfsdskill.1 man page to reflect the change to a distributed mirroring model and make use of the .Dq macro. Modified: projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.1 Modified: projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.1 ============================================================================== --- projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.1 Sun Jun 3 17:17:45 2018 (r334572) +++ projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.1 Sun Jun 3 17:49:45 2018 (r334573) @@ -33,21 +33,25 @@ disables a pNFS data storage server (DS) .Sh SYNOPSIS .Nm -.Ar mounted_on_path_of_DS +.Ar mounted-on-DS-dir .Sh DESCRIPTION The .Nm -command disables one mirror of a mirrored set of DSs. -Two or more DSs may be configured as a mirrored set. -If one of these mirrored DSs is malfunctioning, a system administrator +command disables one DS when mirroring is enabled. +If one mirrored DS is malfunctioning, a system administrator may use this command on the metadata server (MDS) to disable use of this mirror. This command must be used on the MDS and the -.Ar mounted_on_path_of_DS +.Ar mounted-on-DS-dir must be the exact pathname used when mounting the DS on the MDS. .Pp -If this command fails with ``Device not configured'' (ENXIO), it probably +If this command fails with +.Dq Device not configured +(ENXIO), it probably means that the DS has already been disabled due to an error either detected by the MDS or reported to the MDS by a client. +.Pp +The pNFS service should continue to run normally so long as the number of +operational DSs is at least as many as the level of mirroring. .El .Sh SEE ALSO .Xr pnfsdscopymr 1 , From owner-svn-src-projects@freebsd.org Sun Jun 3 18:17:12 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AE21FE87B3 for ; Sun, 3 Jun 2018 18:17:12 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF5E873131; Sun, 3 Jun 2018 18:17:08 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0103F221FB; Sun, 3 Jun 2018 18:17:07 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w53IH76u037661; Sun, 3 Jun 2018 18:17:07 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w53IH7SS037660; Sun, 3 Jun 2018 18:17:07 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806031817.w53IH7SS037660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 3 Jun 2018 18:17:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334575 - projects/pnfs-planb-server/usr.bin/pnfsdsfile X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server/usr.bin/pnfsdsfile X-SVN-Commit-Revision: 334575 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2018 18:17:12 -0000 Author: rmacklem Date: Sun Jun 3 18:17:07 2018 New Revision: 334575 URL: https://svnweb.freebsd.org/changeset/base/334575 Log: Update the pnfsdsfile.1 man page to use the.Dq macro and to try and improve the description of what it does. Modified: projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.1 Modified: projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.1 ============================================================================== --- projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.1 Sun Jun 3 17:55:50 2018 (r334574) +++ projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.1 Sun Jun 3 18:17:07 2018 (r334575) @@ -30,30 +30,40 @@ .Sh NAME .Nm pnfsdsfile .Nd display -a pNFS data storage file's location(s) and/or modify the pnfsd.dsfile extended attribute for them +a pNFS data storage file's location(s) and/or modify the +.Dq pnfsd.dsfile +extended attribute for them .Sh SYNOPSIS .Nm .Op Fl qz .Op Fl s Ar dshostname .Op Fl c Ar old-dshostname,new-dshostname .Op Fl r Ar dshostname -.Ar file_on_MDS +.Ar mdsfile .Sh DESCRIPTION The .Nm command displays the data storage file's location(s) for a pNFS service and/or -modifies the pnfsd.dsfile extended attribute on the file. +modifies the +.Dq pnfsd.dsfile +extended attribute on the +.Ar mdsfile . A pNFS service maintains a data storage file for each regular file on -the MetaData Server(s) (MDS) on one or more of the Data Storage servers (DS). -If there is more than one DS, the DSs are a mirrored set and all of these -DSs should have copies of the -.Ar file_on_MDS -file's data. +the MetaData Server (MDS) on one or more of the Data Servers (DS). +If mirroring is enabled, the data storage file will be on more that one of the DSs. Unless command options are specified, this command displays the location(s) -of the DS file for the MDS file specified by the last command line argument. +of the data storage file for the MDS file +.Ar mdsfile . It must be used on the MDS and the -.Ar file_on_MDS +.Ar mdsfile must be a file on the exported local file system and not an NFSv4.1 mount. +This information is stored in the +.Dq pnfsd.dsfile +extended attribute for this +.Ar mdsfile . +The command line options allow the information in the +.Dq pnfsd.dsfile +extended attribute to be changed. .Pp The following options are available: .Bl -tag -width Ds @@ -87,14 +97,18 @@ This option sets the IP address of the extended attrib .Ar dshostname to 0.0.0.0 so that it will no longer be used. .Pp -This is meant to be used when one of a mirrored set of DSs has been -disabled so that this DS will not be used when it is re-enabled. +This is meant to be used when mirroring is enabled and the +.Ar dshostname +DS is disabled, so that it can be re-enabled once it is repaired. This needs to be done for all files in the exported MDS tree where -the data may not be up-to-date on the recovered DS when it is re-enabled. +the data may not be up-to-date on the repaired DS when it is re-enabled. After being re-enabled, the command .Xr pnfsdscopymr 1 -will be used to copy the the file's data to this DS and then update the extended -attribute to use it. +with the +.Dq -r +option +will be used to copy the the file's data to this repaired DS and then update the +extended attribute to use it. .Pp A typical use of this will be within a .Xr find 1 From owner-svn-src-projects@freebsd.org Sun Jun 3 18:19:51 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A140FE8E3E for ; Sun, 3 Jun 2018 18:19:51 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C524739AC; Sun, 3 Jun 2018 18:19:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55CAF22209; Sun, 3 Jun 2018 18:19:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w53IJn35038408; Sun, 3 Jun 2018 18:19:49 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w53IJneG038407; Sun, 3 Jun 2018 18:19:49 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806031819.w53IJneG038407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 3 Jun 2018 18:19:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334577 - projects/pnfs-planb-server/usr.sbin/nfsd X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server/usr.sbin/nfsd X-SVN-Commit-Revision: 334577 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2018 18:19:51 -0000 Author: rmacklem Date: Sun Jun 3 18:19:48 2018 New Revision: 334577 URL: https://svnweb.freebsd.org/changeset/base/334577 Log: Get rid of a debugging printf in nfsd.c. Modified: projects/pnfs-planb-server/usr.sbin/nfsd/nfsd.c Modified: projects/pnfs-planb-server/usr.sbin/nfsd/nfsd.c ============================================================================== --- projects/pnfs-planb-server/usr.sbin/nfsd/nfsd.c Sun Jun 3 18:19:41 2018 (r334576) +++ projects/pnfs-planb-server/usr.sbin/nfsd/nfsd.c Sun Jun 3 18:19:48 2018 (r334577) @@ -1222,7 +1222,6 @@ parse_dsserver(const char *optarg, struct nfsd_nfsd_ar usage(); *dsvol++ = '\0'; -printf("pnfs path=%s\n", dsvol); /* Append this pathname to dspath. */ pathsiz = strlen(dsvol); if (dspathcnt + pathsiz + 1 > dspathsiz) { From owner-svn-src-projects@freebsd.org Sun Jun 3 18:39:14 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDB0AFEB4CC for ; Sun, 3 Jun 2018 18:39:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6FE5D74D8E; Sun, 3 Jun 2018 18:39:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 512752255C; Sun, 3 Jun 2018 18:39:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w53IdE2P048328; Sun, 3 Jun 2018 18:39:14 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w53IdEfx048327; Sun, 3 Jun 2018 18:39:14 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806031839.w53IdEfx048327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 3 Jun 2018 18:39:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334582 - projects/pnfs-planb-server/usr.sbin/nfsd X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server/usr.sbin/nfsd X-SVN-Commit-Revision: 334582 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2018 18:39:14 -0000 Author: rmacklem Date: Sun Jun 3 18:39:13 2018 New Revision: 334582 URL: https://svnweb.freebsd.org/changeset/base/334582 Log: Add missing SPDX license info in the copyright comment so that it matches nfsd.c in head. Modified: projects/pnfs-planb-server/usr.sbin/nfsd/nfsd.c Modified: projects/pnfs-planb-server/usr.sbin/nfsd/nfsd.c ============================================================================== --- projects/pnfs-planb-server/usr.sbin/nfsd/nfsd.c Sun Jun 3 18:38:03 2018 (r334581) +++ projects/pnfs-planb-server/usr.sbin/nfsd/nfsd.c Sun Jun 3 18:39:13 2018 (r334582) @@ -1,4 +1,6 @@ -/* +/*- + * SPDX-License-Identifier: BSD-3-Clause + * * Copyright (c) 1989, 1993, 1994 * The Regents of the University of California. All rights reserved. * From owner-svn-src-projects@freebsd.org Mon Jun 4 22:15:25 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3445FD518F for ; Mon, 4 Jun 2018 22:15:25 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 84F6269AA2; Mon, 4 Jun 2018 22:15:25 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6610D136A0; Mon, 4 Jun 2018 22:15:25 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w54MFPgc014802; Mon, 4 Jun 2018 22:15:25 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w54MFOPM014799; Mon, 4 Jun 2018 22:15:24 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806042215.w54MFOPM014799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 4 Jun 2018 22:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334642 - in projects/pnfs-planb-server/usr.bin: pnfsdscopymr pnfsdsfile pnfsdskill X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in projects/pnfs-planb-server/usr.bin: pnfsdscopymr pnfsdsfile pnfsdskill X-SVN-Commit-Revision: 334642 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2018 22:15:26 -0000 Author: rmacklem Date: Mon Jun 4 22:15:24 2018 New Revision: 334642 URL: https://svnweb.freebsd.org/changeset/base/334642 Log: Add the SPDX-License-Identifier to the three new source files in the project. Modified: projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.c projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.c projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.c Modified: projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.c ============================================================================== --- projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.c Mon Jun 4 21:42:21 2018 (r334641) +++ projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.c Mon Jun 4 22:15:24 2018 (r334642) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2017 Rick Macklem * All rights reserved. * Modified: projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.c ============================================================================== --- projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.c Mon Jun 4 21:42:21 2018 (r334641) +++ projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.c Mon Jun 4 22:15:24 2018 (r334642) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2017 Rick Macklem * All rights reserved. * Modified: projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.c ============================================================================== --- projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.c Mon Jun 4 21:42:21 2018 (r334641) +++ projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.c Mon Jun 4 22:15:24 2018 (r334642) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * * Copyright (c) 2017 Rick Macklem * All rights reserved. * From owner-svn-src-projects@freebsd.org Tue Jun 5 00:03:45 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4E5BFE9B69 for ; Tue, 5 Jun 2018 00:03:45 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B8F26F43B; Tue, 5 Jun 2018 00:03:45 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w5503hqK098085; Mon, 4 Jun 2018 17:03:43 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w5503hoT098084; Mon, 4 Jun 2018 17:03:43 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201806050003.w5503hoT098084@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r334642 - in projects/pnfs-planb-server/usr.bin: pnfsdscopymr pnfsdsfile pnfsdskill In-Reply-To: <201806042215.w54MFOPM014799@repo.freebsd.org> To: Rick Macklem Date: Mon, 4 Jun 2018 17:03:43 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-projects@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2018 00:03:46 -0000 > Author: rmacklem > Date: Mon Jun 4 22:15:24 2018 > New Revision: 334642 > URL: https://svnweb.freebsd.org/changeset/base/334642 > > Log: > Add the SPDX-License-Identifier to the three new source files in the project. > > Modified: > projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.c > projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.c > projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.c > > Modified: projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.c > ============================================================================== > --- projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.c Mon Jun 4 21:42:21 2018 (r334641) > +++ projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.c Mon Jun 4 22:15:24 2018 (r334642) > @@ -1,4 +1,6 @@ > /*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * Thanks! > * Copyright (c) 2017 Rick Macklem -2018? > * All rights reserved. Can you remove this phrase? There have been several prior commits explaining that we no longer need this, or want it in the sources. Thanks, Rod > * > > Modified: projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.c > ============================================================================== > --- projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.c Mon Jun 4 21:42:21 2018 (r334641) > +++ projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.c Mon Jun 4 22:15:24 2018 (r334642) > @@ -1,4 +1,6 @@ > /*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > * Copyright (c) 2017 Rick Macklem > * All rights reserved. > * > > Modified: projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.c > ============================================================================== > --- projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.c Mon Jun 4 21:42:21 2018 (r334641) > +++ projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.c Mon Jun 4 22:15:24 2018 (r334642) > @@ -1,4 +1,6 @@ > /*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > * Copyright (c) 2017 Rick Macklem > * All rights reserved. > * > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-projects@freebsd.org Tue Jun 5 01:06:00 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 185C1FF1A87 for ; Tue, 5 Jun 2018 01:06:00 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B1EAD71BD2; Tue, 5 Jun 2018 01:05:59 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90E0B151B9; Tue, 5 Jun 2018 01:05:59 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5515xeT000981; Tue, 5 Jun 2018 01:05:59 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5515xMY000979; Tue, 5 Jun 2018 01:05:59 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806050105.w5515xMY000979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 5 Jun 2018 01:05:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334646 - in projects/pnfs-planb-server/usr.bin: pnfsdscopymr pnfsdsfile pnfsdskill X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in projects/pnfs-planb-server/usr.bin: pnfsdscopymr pnfsdsfile pnfsdskill X-SVN-Commit-Revision: 334646 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2018 01:06:00 -0000 Author: rmacklem Date: Tue Jun 5 01:05:58 2018 New Revision: 334646 URL: https://svnweb.freebsd.org/changeset/base/334646 Log: Remove the "all rights reserved" line from the copyright notice. Reported by: rgrimes Modified: projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.c projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.c projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.c Modified: projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.c ============================================================================== --- projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.c Mon Jun 4 23:17:18 2018 (r334645) +++ projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.c Tue Jun 5 01:05:58 2018 (r334646) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2017 Rick Macklem - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.c ============================================================================== --- projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.c Mon Jun 4 23:17:18 2018 (r334645) +++ projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.c Tue Jun 5 01:05:58 2018 (r334646) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2017 Rick Macklem - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.c ============================================================================== --- projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.c Mon Jun 4 23:17:18 2018 (r334645) +++ projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.c Tue Jun 5 01:05:58 2018 (r334646) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2017 Rick Macklem - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-svn-src-projects@freebsd.org Tue Jun 5 01:36:00 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B323FF7503 for ; Tue, 5 Jun 2018 01:36:00 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 751AE73D9A; Tue, 5 Jun 2018 01:35:59 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w551Zu7n098344; Mon, 4 Jun 2018 18:35:56 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w551Zu8K098343; Mon, 4 Jun 2018 18:35:56 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201806050135.w551Zu8K098343@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r334646 - in projects/pnfs-planb-server/usr.bin: pnfsdscopymr pnfsdsfile pnfsdskill In-Reply-To: <201806050105.w5515xMY000979@repo.freebsd.org> To: Rick Macklem Date: Mon, 4 Jun 2018 18:35:56 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-projects@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2018 01:36:00 -0000 > Author: rmacklem > Date: Tue Jun 5 01:05:58 2018 > New Revision: 334646 > URL: https://svnweb.freebsd.org/changeset/base/334646 > > Log: > Remove the "all rights reserved" line from the copyright notice. > > Reported by: rgrimes Thank you! > > Modified: > projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.c > projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.c > projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.c -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-projects@freebsd.org Tue Jun 5 12:00:57 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E08A4FF06CF for ; Tue, 5 Jun 2018 12:00:56 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DA8C72DED; Tue, 5 Jun 2018 12:00:56 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 559661C250; Tue, 5 Jun 2018 12:00:56 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w55C0uHp028469; Tue, 5 Jun 2018 12:00:56 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w55C0tmv028466; Tue, 5 Jun 2018 12:00:55 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806051200.w55C0tmv028466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 5 Jun 2018 12:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334652 - in projects/pnfs-planb-server: usr.bin/pnfsdscopymr usr.bin/pnfsdsfile usr.bin/pnfsdskill usr.sbin/nfsd X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in projects/pnfs-planb-server: usr.bin/pnfsdscopymr usr.bin/pnfsdsfile usr.bin/pnfsdskill usr.sbin/nfsd X-SVN-Commit-Revision: 334652 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2018 12:00:57 -0000 Author: rmacklem Date: Tue Jun 5 12:00:55 2018 New Revision: 334652 URL: https://svnweb.freebsd.org/changeset/base/334652 Log: Get rid of "all rights reserved" on the man page copyright notices. Modified: projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.1 projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.1 projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.1 projects/pnfs-planb-server/usr.sbin/nfsd/pnfs.4 Modified: projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.1 ============================================================================== --- projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.1 Tue Jun 5 11:03:24 2018 (r334651) +++ projects/pnfs-planb-server/usr.bin/pnfsdscopymr/pnfsdscopymr.1 Tue Jun 5 12:00:55 2018 (r334652) @@ -1,5 +1,4 @@ .\" Copyright (c) 2018 Rick Macklem -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.1 ============================================================================== --- projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.1 Tue Jun 5 11:03:24 2018 (r334651) +++ projects/pnfs-planb-server/usr.bin/pnfsdsfile/pnfsdsfile.1 Tue Jun 5 12:00:55 2018 (r334652) @@ -1,5 +1,4 @@ .\" Copyright (c) 2017 Rick Macklem -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.1 ============================================================================== --- projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.1 Tue Jun 5 11:03:24 2018 (r334651) +++ projects/pnfs-planb-server/usr.bin/pnfsdskill/pnfsdskill.1 Tue Jun 5 12:00:55 2018 (r334652) @@ -1,5 +1,4 @@ .\" Copyright (c) 2018 Rick Macklem -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions Modified: projects/pnfs-planb-server/usr.sbin/nfsd/pnfs.4 ============================================================================== --- projects/pnfs-planb-server/usr.sbin/nfsd/pnfs.4 Tue Jun 5 11:03:24 2018 (r334651) +++ projects/pnfs-planb-server/usr.sbin/nfsd/pnfs.4 Tue Jun 5 12:00:55 2018 (r334652) @@ -1,5 +1,4 @@ .\" Copyright (c) 2017 Rick Macklem -.\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions From owner-svn-src-projects@freebsd.org Tue Jun 5 20:41:07 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00C5AFF5A4C for ; Tue, 5 Jun 2018 20:41:07 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A9F1270E7E; Tue, 5 Jun 2018 20:41:06 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8B09A21540; Tue, 5 Jun 2018 20:41:06 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w55Kf6v8096748; Tue, 5 Jun 2018 20:41:06 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w55Kf6bj096747; Tue, 5 Jun 2018 20:41:06 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806052041.w55Kf6bj096747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 5 Jun 2018 20:41:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334670 - projects/pnfs-planb-server/sys/fs/nfsserver X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server/sys/fs/nfsserver X-SVN-Commit-Revision: 334670 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2018 20:41:07 -0000 Author: rmacklem Date: Tue Jun 5 20:41:06 2018 New Revision: 334670 URL: https://svnweb.freebsd.org/changeset/base/334670 Log: Thanks to a warning from the more recent clang, I caught the fact that the logic of this "if" was backwards. Weirdly interesting is that it still worked, because it matched the devid that was for the other mirror and still got rid of the layout. It did mean that it recalled layouts that didn't have to be recalled, but that was safe. Modified: projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c Modified: projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c Tue Jun 5 20:34:11 2018 (r334669) +++ projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdstate.c Tue Jun 5 20:41:06 2018 (r334670) @@ -6783,7 +6783,7 @@ nfsrv_flexmirrordel(char *devid, NFSPROC_T *p) tl += 3; for (j = 0; j < lyp->lay_mirrorcnt; j++) { tl++; - if (!NFSBCMP(devid, tl, NFSX_V4DEVICEID) + if (NFSBCMP(devid, tl, NFSX_V4DEVICEID) == 0) { /* Found one. */ NFSD_DEBUG(4, "fnd one\n"); From owner-svn-src-projects@freebsd.org Thu Jun 7 02:32:01 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6D17FEF814 for ; Thu, 7 Jun 2018 02:32:00 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66E2978456; Thu, 7 Jun 2018 02:30:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 49A5519F5F; Thu, 7 Jun 2018 02:30:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w572Un2u003958; Thu, 7 Jun 2018 02:30:49 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w572UngO003957; Thu, 7 Jun 2018 02:30:49 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806070230.w572UngO003957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 7 Jun 2018 02:30:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334751 - in projects/pnfs-planb-server: sys/fs/nfs usr.sbin/nfsd X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in projects/pnfs-planb-server: sys/fs/nfs usr.sbin/nfsd X-SVN-Commit-Revision: 334751 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2018 02:32:01 -0000 Author: rmacklem Date: Thu Jun 7 02:30:48 2018 New Revision: 334751 URL: https://svnweb.freebsd.org/changeset/base/334751 Log: Fix some things found during a "make universe". A couple of signed vs unsigned comparisons and declaring "optarg" local to a function were minor ones. The main one was the alignment for sockaddr_in is stricter than sockaddr for MIPS. To deal with this, I copied the sockaddr into a sockaddr_in. (I actually suspect that getaddrinfo() returns a well aligned ptr, but...) Modified: projects/pnfs-planb-server/sys/fs/nfs/nfsproto.h projects/pnfs-planb-server/usr.sbin/nfsd/nfsd.c Modified: projects/pnfs-planb-server/sys/fs/nfs/nfsproto.h ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfs/nfsproto.h Thu Jun 7 02:20:27 2018 (r334750) +++ projects/pnfs-planb-server/sys/fs/nfs/nfsproto.h Thu Jun 7 02:30:48 2018 (r334751) @@ -278,6 +278,7 @@ /* variants for multiple versions */ #define NFSX_STATFS(v3) ((v3) ? NFSX_V3STATFS : NFSX_V2STATFS) +#if defined(_KERNEL) || defined(KERNEL) /* nfs rpc procedure numbers (before version mapping) */ #define NFSPROC_NULL 0 #define NFSPROC_GETATTR 1 @@ -359,6 +360,7 @@ #define NFSV41_NPROCS 56 #endif /* NFS_V3NPROCS */ +#endif /* _KERNEL */ /* * Define NFS_NPROCS as NFSV4_NPROCS for the experimental kernel code. Modified: projects/pnfs-planb-server/usr.sbin/nfsd/nfsd.c ============================================================================== --- projects/pnfs-planb-server/usr.sbin/nfsd/nfsd.c Thu Jun 7 02:20:27 2018 (r334750) +++ projects/pnfs-planb-server/usr.sbin/nfsd/nfsd.c Thu Jun 7 02:30:48 2018 (r334751) @@ -1175,15 +1175,16 @@ backup_stable(__unused int signo) * Parse the pNFS string and extract the DS servers and ports numbers. */ static void -parse_dsserver(const char *optarg, struct nfsd_nfsd_args *nfsdargp) +parse_dsserver(const char *optionarg, struct nfsd_nfsd_args *nfsdargp) { char *ad, *cp, *cp2, *dsaddr, *dshost, *dspath, *dsvol, nfsprt[9]; - int adsiz, dsaddrcnt, dshostcnt, dspathcnt, ecode, hostsiz, pathsiz; + int ecode; + u_int adsiz, dsaddrcnt, dshostcnt, dspathcnt, hostsiz, pathsiz; size_t dsaddrsiz, dshostsiz, dspathsiz, nfsprtsiz; struct addrinfo hints, *ai_tcp; - struct sockaddr_in *sin; + struct sockaddr_in sin; - cp = strdup(optarg); + cp = strdup(optionarg); if (cp == NULL) errx(1, "Out of memory"); @@ -1248,12 +1249,14 @@ parse_dsserver(const char *optarg, struct nfsd_nfsd_ar if (ecode != 0) err(1, "getaddrinfo pnfs: %s %s", cp, gai_strerror(ecode)); - sin = (struct sockaddr_in *)ai_tcp->ai_addr; - if (sin->sin_family != AF_INET) + if (ai_tcp->ai_addr->sa_family != AF_INET || + ai_tcp->ai_addr->sa_len < sizeof(sin)) err(1, "getaddrinfo() returned non-INET address"); + /* Mips cares about sockaddr_in alignment, so copy the addr. */ + memcpy(&sin, ai_tcp->ai_addr, sizeof(sin)); /* Append this address to dsaddr. */ - ad = inet_ntoa(sin->sin_addr); + ad = inet_ntoa(sin.sin_addr); adsiz = strlen(ad); if (dsaddrcnt + adsiz + nfsprtsiz + 1 > dsaddrsiz) { dsaddrsiz *= 2; @@ -1279,12 +1282,6 @@ parse_dsserver(const char *optarg, struct nfsd_nfsd_ar cp = cp2; } while (cp != NULL); - /* - * At the point, ai_tcp refers to the last DS server host and - * sin is set to point to the sockaddr structure in it. - * Set the port# for the DS Mount protocol and get the DS root FH. - */ - sin->sin_port = htons(2049); nfsdargp->addr = dsaddr; nfsdargp->addrlen = dsaddrcnt; nfsdargp->dnshost = dshost; @@ -1293,5 +1290,4 @@ parse_dsserver(const char *optarg, struct nfsd_nfsd_ar nfsdargp->dspathlen = dspathcnt; freeaddrinfo(ai_tcp); } - From owner-svn-src-projects@freebsd.org Thu Jun 7 10:59:02 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E323EFE0CC5 for ; Thu, 7 Jun 2018 10:59:01 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F4B18A59C; Thu, 7 Jun 2018 10:58:48 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D4691F2EE; Thu, 7 Jun 2018 10:58:48 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w57Awms6055291; Thu, 7 Jun 2018 10:58:48 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w57Awmul055290; Thu, 7 Jun 2018 10:58:48 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806071058.w57Awmul055290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 7 Jun 2018 10:58:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334772 - projects/pnfs-planb-server/sys/fs/nfs X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server/sys/fs/nfs X-SVN-Commit-Revision: 334772 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2018 10:59:02 -0000 Author: rmacklem Date: Thu Jun 7 10:58:48 2018 New Revision: 334772 URL: https://svnweb.freebsd.org/changeset/base/334772 Log: Change nfsproto.h slightly, so that it exposes NFSPROC_xxx to userland, but only if they are not already defined. Modified: projects/pnfs-planb-server/sys/fs/nfs/nfsproto.h Modified: projects/pnfs-planb-server/sys/fs/nfs/nfsproto.h ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfs/nfsproto.h Thu Jun 7 09:03:42 2018 (r334771) +++ projects/pnfs-planb-server/sys/fs/nfs/nfsproto.h Thu Jun 7 10:58:48 2018 (r334772) @@ -278,7 +278,7 @@ /* variants for multiple versions */ #define NFSX_STATFS(v3) ((v3) ? NFSX_V3STATFS : NFSX_V2STATFS) -#if defined(_KERNEL) || defined(KERNEL) +#ifndef NFSPROC_NULL /* nfs rpc procedure numbers (before version mapping) */ #define NFSPROC_NULL 0 #define NFSPROC_GETATTR 1 @@ -302,6 +302,7 @@ #define NFSPROC_FSINFO 19 #define NFSPROC_PATHCONF 20 #define NFSPROC_COMMIT 21 +#endif /* NFSPROC_NULL */ /* * The lower numbers -> 21 are used by NFSv2 and v3. These define higher @@ -360,7 +361,6 @@ #define NFSV41_NPROCS 56 #endif /* NFS_V3NPROCS */ -#endif /* _KERNEL */ /* * Define NFS_NPROCS as NFSV4_NPROCS for the experimental kernel code. From owner-svn-src-projects@freebsd.org Thu Jun 7 11:41:00 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC68CFE2950 for ; Thu, 7 Jun 2018 11:41:00 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F314C8C34D; Thu, 7 Jun 2018 11:40:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1A281F97F; Thu, 7 Jun 2018 11:40:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w57BeDwD075326; Thu, 7 Jun 2018 11:40:13 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w57BeDj2075325; Thu, 7 Jun 2018 11:40:13 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806071140.w57BeDj2075325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 7 Jun 2018 11:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334776 - projects/pnfs-planb-server/sys/fs/nfs X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server/sys/fs/nfs X-SVN-Commit-Revision: 334776 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2018 11:41:00 -0000 Author: rmacklem Date: Thu Jun 7 11:40:13 2018 New Revision: 334776 URL: https://svnweb.freebsd.org/changeset/base/334776 Log: Add a comment warning about the NFSPROC_xxx numbering conflict with . Modified: projects/pnfs-planb-server/sys/fs/nfs/nfsproto.h Modified: projects/pnfs-planb-server/sys/fs/nfs/nfsproto.h ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfs/nfsproto.h Thu Jun 7 11:34:59 2018 (r334775) +++ projects/pnfs-planb-server/sys/fs/nfs/nfsproto.h Thu Jun 7 11:40:13 2018 (r334776) @@ -278,6 +278,10 @@ /* variants for multiple versions */ #define NFSX_STATFS(v3) ((v3) ? NFSX_V3STATFS : NFSX_V2STATFS) +/* + * Beware. NFSPROC_NULL and friends are defined in + * as well and the numbers are different. + */ #ifndef NFSPROC_NULL /* nfs rpc procedure numbers (before version mapping) */ #define NFSPROC_NULL 0 From owner-svn-src-projects@freebsd.org Thu Jun 7 19:48:50 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DE35FE9BCB for ; Thu, 7 Jun 2018 19:48:50 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F4F07BB5D; Thu, 7 Jun 2018 19:48:50 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F32D24A0B; Thu, 7 Jun 2018 19:48:50 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w57Jmn0e026153; Thu, 7 Jun 2018 19:48:49 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w57JmnJf026149; Thu, 7 Jun 2018 19:48:49 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806071948.w57JmnJf026149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 7 Jun 2018 19:48:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334812 - in projects/pnfs-planb-server/sys/fs: nfs nfsserver X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in projects/pnfs-planb-server/sys/fs: nfs nfsserver X-SVN-Commit-Revision: 334812 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2018 19:48:50 -0000 Author: rmacklem Date: Thu Jun 7 19:48:49 2018 New Revision: 334812 URL: https://svnweb.freebsd.org/changeset/base/334812 Log: Move nfsrv_setacl() from sys/fs/nfs (the common module) to sys/fs/nfsserver (the nfsd module) since it is only called from the server. This is needed, since it now calls nfsrv_dssetacl(), which is in the server. Found during "make universe" for kernels that have "options NFSCL", but not "options NFSD". Modified: projects/pnfs-planb-server/sys/fs/nfs/nfs_commonacl.c projects/pnfs-planb-server/sys/fs/nfs/nfs_var.h projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c Modified: projects/pnfs-planb-server/sys/fs/nfs/nfs_commonacl.c ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfs/nfs_commonacl.c Thu Jun 7 19:39:11 2018 (r334811) +++ projects/pnfs-planb-server/sys/fs/nfs/nfs_commonacl.c Thu Jun 7 19:48:49 2018 (r334812) @@ -450,41 +450,6 @@ nfsrv_buildacl(struct nfsrv_descript *nd, NFSACL_T *ac } /* - * Set an NFSv4 acl. - */ -APPLESTATIC int -nfsrv_setacl(vnode_t vp, NFSACL_T *aclp, struct ucred *cred, - NFSPROC_T *p) -{ - int error; - - if (nfsrv_useacl == 0 || nfs_supportsnfsv4acls(vp) == 0) { - error = NFSERR_ATTRNOTSUPP; - goto out; - } - /* - * With NFSv4 ACLs, chmod(2) may need to add additional entries. - * Make sure it has enough room for that - splitting every entry - * into two and appending "canonical six" entries at the end. - * Cribbed out of kern/vfs_acl.c - Rick M. - */ - if (aclp->acl_cnt > (ACL_MAX_ENTRIES - 6) / 2) { - error = NFSERR_ATTRNOTSUPP; - goto out; - } - error = VOP_SETACL(vp, ACL_TYPE_NFS4, aclp, cred, p); - if (error == 0) { - error = nfsrv_dssetacl(vp, aclp, cred, p); - if (error == ENOENT) - error = 0; - } - -out: - NFSEXITCODE(error); - return (error); -} - -/* * Compare two NFSv4 acls. * Return 0 if they are the same, 1 if not the same. */ Modified: projects/pnfs-planb-server/sys/fs/nfs/nfs_var.h ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfs/nfs_var.h Thu Jun 7 19:39:11 2018 (r334811) +++ projects/pnfs-planb-server/sys/fs/nfs/nfs_var.h Thu Jun 7 19:48:49 2018 (r334812) @@ -426,8 +426,6 @@ int nfsrv_dissectace(struct nfsrv_descript *, struct a int *, int *, NFSPROC_T *); int nfsrv_buildacl(struct nfsrv_descript *, NFSACL_T *, enum vtype, NFSPROC_T *); -int nfsrv_setacl(vnode_t, NFSACL_T *, struct ucred *, - NFSPROC_T *); int nfsrv_compareacl(NFSACL_T *, NFSACL_T *); /* nfs_clrpcops.c */ @@ -716,8 +714,8 @@ int nfsrv_dscreate(struct vnode *, struct vattr *, str fhandle_t *, struct pnfsdsfile *, struct pnfsdsattr *, char *, struct ucred *, NFSPROC_T *, struct vnode **); int nfsrv_updatemdsattr(struct vnode *, struct nfsvattr *, NFSPROC_T *); -int nfsrv_dssetacl(struct vnode *, struct acl *, struct ucred *, NFSPROC_T *); void nfsrv_killrpcs(struct nfsmount *); +int nfsrv_setacl(struct vnode *, NFSACL_T *, struct ucred *, NFSPROC_T *); /* nfs_commonkrpc.c */ int newnfs_nmcancelreqs(struct nfsmount *); Modified: projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c Thu Jun 7 19:39:11 2018 (r334811) +++ projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdport.c Thu Jun 7 19:48:49 2018 (r334812) @@ -131,6 +131,8 @@ static int nfsrv_pnfslookupds(struct vnode *, struct v static void nfsrv_pnfssetfh(struct vnode *, struct pnfsdsfile *, struct vnode *, NFSPROC_T *); static int nfsrv_dsremove(struct vnode *, char *, struct ucred *, NFSPROC_T *); +static int nfsrv_dssetacl(struct vnode *, struct acl *, struct ucred *, + NFSPROC_T *); static int nfsrv_pnfsstatfs(struct statfs *); int nfs_pnfsio(task_fn_t *, void *); @@ -4250,7 +4252,7 @@ nfsrv_updatemdsattr(struct vnode *vp, struct nfsvattr /* * Set the NFSv4 ACL on the DS file to the same ACL as the MDS file. */ -int +static int nfsrv_dssetacl(struct vnode *vp, struct acl *aclp, struct ucred *cred, NFSPROC_T *p) { @@ -5550,6 +5552,40 @@ nfsrv_pnfsstatfs(struct statfs *sf) } free(tsf, M_TEMP); free(dvpp, M_TEMP); + return (error); +} + +/* + * Set an NFSv4 acl. + */ +int +nfsrv_setacl(struct vnode *vp, NFSACL_T *aclp, struct ucred *cred, NFSPROC_T *p) +{ + int error; + + if (nfsrv_useacl == 0 || nfs_supportsnfsv4acls(vp) == 0) { + error = NFSERR_ATTRNOTSUPP; + goto out; + } + /* + * With NFSv4 ACLs, chmod(2) may need to add additional entries. + * Make sure it has enough room for that - splitting every entry + * into two and appending "canonical six" entries at the end. + * Cribbed out of kern/vfs_acl.c - Rick M. + */ + if (aclp->acl_cnt > (ACL_MAX_ENTRIES - 6) / 2) { + error = NFSERR_ATTRNOTSUPP; + goto out; + } + error = VOP_SETACL(vp, ACL_TYPE_NFS4, aclp, cred, p); + if (error == 0) { + error = nfsrv_dssetacl(vp, aclp, cred, p); + if (error == ENOENT) + error = 0; + } + +out: + NFSEXITCODE(error); return (error); } From owner-svn-src-projects@freebsd.org Fri Jun 8 03:22:40 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09A61100DD01 for ; Fri, 8 Jun 2018 03:22:40 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A98EC6F13B; Fri, 8 Jun 2018 03:22:39 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8AB1314E3; Fri, 8 Jun 2018 03:22:39 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w583Md22059317; Fri, 8 Jun 2018 03:22:39 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w583MdqL059316; Fri, 8 Jun 2018 03:22:39 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806080322.w583MdqL059316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 8 Jun 2018 03:22:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334825 - projects/pnfs-planb-server/sys/fs/nfsserver X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server/sys/fs/nfsserver X-SVN-Commit-Revision: 334825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2018 03:22:40 -0000 Author: rmacklem Date: Fri Jun 8 03:22:39 2018 New Revision: 334825 URL: https://svnweb.freebsd.org/changeset/base/334825 Log: Fix a use of "tl" found during "make universe". Since maxcnt is only used as a range sanity check, this bug didn't have a major effect on the server. Modified: projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdserv.c Modified: projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdserv.c Fri Jun 8 03:16:16 2018 (r334824) +++ projects/pnfs-planb-server/sys/fs/nfsserver/nfs_nfsdserv.c Fri Jun 8 03:22:39 2018 (r334825) @@ -4399,7 +4399,7 @@ nfsrvd_layoutget(struct nfsrv_descript *nd, __unused i stateid.seqid = fxdr_unsigned(uint32_t, *tl++); NFSBCOPY(tl, stateid.other, NFSX_STATEIDOTHER); tl += (NFSX_STATEIDOTHER / NFSX_UNSIGNED); - maxcnt = fxdr_unsigned(int, tl); + maxcnt = fxdr_unsigned(int, *tl); NFSD_DEBUG(4, "layoutget ltyp=%d iom=%d off=%ju len=%ju mlen=%ju\n", layouttype, iomode, (uintmax_t)offset, (uintmax_t)len, (uintmax_t)minlen); From owner-svn-src-projects@freebsd.org Sat Jun 9 23:07:33 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAB43101B361 for ; Sat, 9 Jun 2018 23:07:33 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 809727CFC5; Sat, 9 Jun 2018 23:07:33 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 63414245D9; Sat, 9 Jun 2018 23:07:33 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w59N7XgW081407; Sat, 9 Jun 2018 23:07:33 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w59N7XI9081406; Sat, 9 Jun 2018 23:07:33 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806092307.w59N7XI9081406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 9 Jun 2018 23:07:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334900 - projects/pnfs-planb-server/sys/fs/nfs X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/pnfs-planb-server/sys/fs/nfs X-SVN-Commit-Revision: 334900 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2018 23:07:34 -0000 Author: rmacklem Date: Sat Jun 9 23:07:32 2018 New Revision: 334900 URL: https://svnweb.freebsd.org/changeset/base/334900 Log: Tidy up a comment which hopefully is now less confusing. Modified: projects/pnfs-planb-server/sys/fs/nfs/nfs.h Modified: projects/pnfs-planb-server/sys/fs/nfs/nfs.h ============================================================================== --- projects/pnfs-planb-server/sys/fs/nfs/nfs.h Sat Jun 9 22:30:10 2018 (r334899) +++ projects/pnfs-planb-server/sys/fs/nfs/nfs.h Sat Jun 9 23:07:32 2018 (r334900) @@ -189,8 +189,8 @@ struct nfsd_nfsd_args { }; /* - * NFSDEV_MAXMIRRORS - Maximum # of mirrors for a DS. - * (Most will only have a single mirror, but this setting allows up to 3.) + * NFSDEV_MAXMIRRORS - Maximum level of mirroring for a DS. + * (Most will only put files on two DSs, but this setting allows up to 4.) * NFSDEV_MAXVERS - maximum number of NFS versions supported by Flex File. */ #define NFSDEV_MAXMIRRORS 4 From owner-svn-src-projects@freebsd.org Sat Jun 9 23:45:10 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D7131002A89 for ; Sat, 9 Jun 2018 23:45:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E92957F66A; Sat, 9 Jun 2018 23:45:09 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C7A7124C3F; Sat, 9 Jun 2018 23:45:09 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w59Nj9GC002190; Sat, 9 Jun 2018 23:45:09 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w59Nj6QL002170; Sat, 9 Jun 2018 23:45:06 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806092345.w59Nj6QL002170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 9 Jun 2018 23:45:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r334905 - in projects/pnfs-planb-server/sys: amd64/amd64 amd64/include arm/arm arm/conf arm/xscale/ixp425 arm64/arm64 arm64/conf cam/mmc cddl/compat/opensolaris/kern cddl/contrib/openso... X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in projects/pnfs-planb-server/sys: amd64/amd64 amd64/include arm/arm arm/conf arm/xscale/ixp425 arm64/arm64 arm64/conf cam/mmc cddl/compat/opensolaris/kern cddl/contrib/opensolaris/uts/common/fs/zfs c... X-SVN-Commit-Revision: 334905 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2018 23:45:10 -0000 Author: rmacklem Date: Sat Jun 9 23:45:05 2018 New Revision: 334905 URL: https://svnweb.freebsd.org/changeset/base/334905 Log: Merge in an up to date kernel from current/head. Added: projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/linux/export.h - copied unchanged from r334904, head/sys/compat/linuxkpi/common/include/linux/export.h projects/pnfs-planb-server/sys/modules/tcp/rack/ - copied from r334904, head/sys/modules/tcp/rack/ projects/pnfs-planb-server/sys/netinet/tcp_stacks/rack.c - copied unchanged from r334904, head/sys/netinet/tcp_stacks/rack.c projects/pnfs-planb-server/sys/netinet/tcp_stacks/rack_bbr_common.h - copied unchanged from r334904, head/sys/netinet/tcp_stacks/rack_bbr_common.h projects/pnfs-planb-server/sys/netinet/tcp_stacks/sack_filter.c - copied unchanged from r334904, head/sys/netinet/tcp_stacks/sack_filter.c projects/pnfs-planb-server/sys/netinet/tcp_stacks/sack_filter.h - copied unchanged from r334904, head/sys/netinet/tcp_stacks/sack_filter.h projects/pnfs-planb-server/sys/netinet/tcp_stacks/tcp_rack.h - copied unchanged from r334904, head/sys/netinet/tcp_stacks/tcp_rack.h Deleted: projects/pnfs-planb-server/sys/dev/hwpmc/hwpmc_xscale.c Modified: projects/pnfs-planb-server/sys/amd64/amd64/machdep.c projects/pnfs-planb-server/sys/amd64/amd64/mp_machdep.c projects/pnfs-planb-server/sys/amd64/amd64/pmap.c projects/pnfs-planb-server/sys/amd64/amd64/support.S projects/pnfs-planb-server/sys/amd64/amd64/trap.c projects/pnfs-planb-server/sys/amd64/include/cpufunc.h projects/pnfs-planb-server/sys/amd64/include/pmc_mdep.h projects/pnfs-planb-server/sys/arm/arm/pmu.c projects/pnfs-planb-server/sys/arm/conf/GENERIC-NODEBUG projects/pnfs-planb-server/sys/arm/xscale/ixp425/files.ixp425 projects/pnfs-planb-server/sys/arm64/arm64/swtch.S projects/pnfs-planb-server/sys/arm64/conf/GENERIC-NODEBUG projects/pnfs-planb-server/sys/cam/mmc/mmc_da.c projects/pnfs-planb-server/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_scan.h projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/range_tree.h projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_root.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/sys/taskq.h projects/pnfs-planb-server/sys/cddl/dev/profile/profile.c projects/pnfs-planb-server/sys/compat/freebsd32/freebsd32_systrace_args.c projects/pnfs-planb-server/sys/compat/freebsd32/syscalls.master projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/asm/atomic.h projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/asm/msr.h projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/linux/device.h projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/linux/ktime.h projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/linux/list.h projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/linux/math64.h projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/linux/mm.h projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/linux/module.h projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/linux/sched.h projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/linux/slab.h projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/linux/time.h projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/linux/timer.h projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/linux/types.h projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/linux/wait.h projects/pnfs-planb-server/sys/compat/linuxkpi/common/include/linux/workqueue.h projects/pnfs-planb-server/sys/compat/linuxkpi/common/src/linux_schedule.c projects/pnfs-planb-server/sys/compat/linuxkpi/common/src/linux_work.c projects/pnfs-planb-server/sys/conf/NOTES projects/pnfs-planb-server/sys/conf/kern.mk projects/pnfs-planb-server/sys/conf/options projects/pnfs-planb-server/sys/contrib/dev/acpica/changes.txt projects/pnfs-planb-server/sys/contrib/dev/acpica/common/acfileio.c projects/pnfs-planb-server/sys/contrib/dev/acpica/common/dmtbdump2.c projects/pnfs-planb-server/sys/contrib/dev/acpica/common/dmtbinfo2.c projects/pnfs-planb-server/sys/contrib/dev/acpica/compiler/aslload.c projects/pnfs-planb-server/sys/contrib/dev/acpica/compiler/dttable1.c projects/pnfs-planb-server/sys/contrib/dev/acpica/compiler/dttemplate.h projects/pnfs-planb-server/sys/contrib/dev/acpica/components/debugger/dbnames.c projects/pnfs-planb-server/sys/contrib/dev/acpica/components/debugger/dbobject.c projects/pnfs-planb-server/sys/contrib/dev/acpica/components/dispatcher/dsdebug.c projects/pnfs-planb-server/sys/contrib/dev/acpica/components/executer/exconfig.c projects/pnfs-planb-server/sys/contrib/dev/acpica/components/namespace/nsdump.c projects/pnfs-planb-server/sys/contrib/dev/acpica/components/parser/psloop.c projects/pnfs-planb-server/sys/contrib/dev/acpica/components/parser/psobject.c projects/pnfs-planb-server/sys/contrib/dev/acpica/components/parser/pswalk.c projects/pnfs-planb-server/sys/contrib/dev/acpica/components/utilities/uterror.c projects/pnfs-planb-server/sys/contrib/dev/acpica/include/acdisasm.h projects/pnfs-planb-server/sys/contrib/dev/acpica/include/aclocal.h projects/pnfs-planb-server/sys/contrib/dev/acpica/include/acoutput.h projects/pnfs-planb-server/sys/contrib/dev/acpica/include/acpixf.h projects/pnfs-planb-server/sys/contrib/dev/acpica/include/actbinfo.h projects/pnfs-planb-server/sys/contrib/dev/acpica/include/actbl2.h projects/pnfs-planb-server/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c projects/pnfs-planb-server/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c projects/pnfs-planb-server/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c projects/pnfs-planb-server/sys/contrib/zstd/lib/freebsd/stdlib.h projects/pnfs-planb-server/sys/dev/acpica/acpi.c projects/pnfs-planb-server/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c projects/pnfs-planb-server/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c projects/pnfs-planb-server/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c projects/pnfs-planb-server/sys/dev/evdev/input-event-codes.h projects/pnfs-planb-server/sys/dev/evdev/input.h projects/pnfs-planb-server/sys/dev/hwpmc/hwpmc_amd.c projects/pnfs-planb-server/sys/dev/hwpmc/hwpmc_arm.c projects/pnfs-planb-server/sys/dev/hwpmc/hwpmc_arm64.c projects/pnfs-planb-server/sys/dev/hwpmc/hwpmc_armv7.c projects/pnfs-planb-server/sys/dev/hwpmc/hwpmc_core.c projects/pnfs-planb-server/sys/dev/hwpmc/hwpmc_core.h projects/pnfs-planb-server/sys/dev/hwpmc/hwpmc_e500.c projects/pnfs-planb-server/sys/dev/hwpmc/hwpmc_logging.c projects/pnfs-planb-server/sys/dev/hwpmc/hwpmc_mips.c projects/pnfs-planb-server/sys/dev/hwpmc/hwpmc_mod.c projects/pnfs-planb-server/sys/dev/hwpmc/hwpmc_mpc7xxx.c projects/pnfs-planb-server/sys/dev/hwpmc/hwpmc_ppc970.c projects/pnfs-planb-server/sys/dev/hwpmc/hwpmc_soft.c projects/pnfs-planb-server/sys/dev/liquidio/lio_bsd.h projects/pnfs-planb-server/sys/dev/md/md.c projects/pnfs-planb-server/sys/dev/ocs_fc/ocs_mgmt.c projects/pnfs-planb-server/sys/dev/ofw/ofw_fdt.c projects/pnfs-planb-server/sys/dev/puc/pucdata.c projects/pnfs-planb-server/sys/dev/usb/serial/u3g.c projects/pnfs-planb-server/sys/dev/usb/usbdevs projects/pnfs-planb-server/sys/dev/vnic/thunder_bgx_fdt.c projects/pnfs-planb-server/sys/i386/i386/trap.c projects/pnfs-planb-server/sys/i386/include/cpufunc.h projects/pnfs-planb-server/sys/i386/include/pmc_mdep.h projects/pnfs-planb-server/sys/kern/kern_exec.c projects/pnfs-planb-server/sys/kern/kern_kthread.c projects/pnfs-planb-server/sys/kern/kern_malloc.c projects/pnfs-planb-server/sys/kern/kern_mutex.c projects/pnfs-planb-server/sys/kern/kern_pmc.c projects/pnfs-planb-server/sys/kern/kern_rmlock.c projects/pnfs-planb-server/sys/kern/kern_rwlock.c projects/pnfs-planb-server/sys/kern/kern_thr.c projects/pnfs-planb-server/sys/kern/kern_thread.c projects/pnfs-planb-server/sys/kern/subr_counter.c projects/pnfs-planb-server/sys/kern/subr_pidctrl.c projects/pnfs-planb-server/sys/kern/subr_trap.c projects/pnfs-planb-server/sys/kern/subr_turnstile.c projects/pnfs-planb-server/sys/kern/syscalls.master projects/pnfs-planb-server/sys/kern/systrace_args.c projects/pnfs-planb-server/sys/kern/uipc_debug.c projects/pnfs-planb-server/sys/kern/uipc_sockbuf.c projects/pnfs-planb-server/sys/kern/uipc_socket.c projects/pnfs-planb-server/sys/kern/uipc_usrreq.c projects/pnfs-planb-server/sys/libkern/strchr.c projects/pnfs-planb-server/sys/libkern/strrchr.c projects/pnfs-planb-server/sys/mips/atheros/apb.c projects/pnfs-planb-server/sys/mips/cavium/octeon_pmc.c projects/pnfs-planb-server/sys/modules/Makefile projects/pnfs-planb-server/sys/modules/tcp/Makefile projects/pnfs-planb-server/sys/net/if_gif.c projects/pnfs-planb-server/sys/net/if_gif.h projects/pnfs-planb-server/sys/net/if_gre.c projects/pnfs-planb-server/sys/net/if_gre.h projects/pnfs-planb-server/sys/net/if_loop.c projects/pnfs-planb-server/sys/net/if_me.c projects/pnfs-planb-server/sys/net/if_stf.c projects/pnfs-planb-server/sys/net/iflib.c projects/pnfs-planb-server/sys/netinet/in_gif.c projects/pnfs-planb-server/sys/netinet/in_pcb.c projects/pnfs-planb-server/sys/netinet/in_pcb.h projects/pnfs-planb-server/sys/netinet/ip_encap.c projects/pnfs-planb-server/sys/netinet/ip_encap.h projects/pnfs-planb-server/sys/netinet/ip_gre.c projects/pnfs-planb-server/sys/netinet/ip_mroute.c projects/pnfs-planb-server/sys/netinet/ip_output.c projects/pnfs-planb-server/sys/netinet/libalias/alias_mod.h projects/pnfs-planb-server/sys/netinet/pim_var.h projects/pnfs-planb-server/sys/netinet/sctp_input.c projects/pnfs-planb-server/sys/netinet/sctp_usrreq.c projects/pnfs-planb-server/sys/netinet/tcp.h projects/pnfs-planb-server/sys/netinet/tcp_fsm.h projects/pnfs-planb-server/sys/netinet/tcp_hpts.c projects/pnfs-planb-server/sys/netinet/tcp_log_buf.h projects/pnfs-planb-server/sys/netinet/tcp_output.c projects/pnfs-planb-server/sys/netinet/tcp_stacks/fastpath.c projects/pnfs-planb-server/sys/netinet/tcp_timer.c projects/pnfs-planb-server/sys/netinet/tcp_timer.h projects/pnfs-planb-server/sys/netinet/tcp_var.h projects/pnfs-planb-server/sys/netinet/udp_usrreq.c projects/pnfs-planb-server/sys/netinet6/in6_gif.c projects/pnfs-planb-server/sys/netinet6/in6_pcb.c projects/pnfs-planb-server/sys/netinet6/in6_src.c projects/pnfs-planb-server/sys/netinet6/ip6_gre.c projects/pnfs-planb-server/sys/netinet6/ip6_mroute.c projects/pnfs-planb-server/sys/netinet6/ip6_output.c projects/pnfs-planb-server/sys/netinet6/pim6_var.h projects/pnfs-planb-server/sys/netinet6/scope6.c projects/pnfs-planb-server/sys/netinet6/scope6_var.h projects/pnfs-planb-server/sys/netinet6/udp6_usrreq.c projects/pnfs-planb-server/sys/netipsec/key.c projects/pnfs-planb-server/sys/netipsec/xform_ah.c projects/pnfs-planb-server/sys/netipsec/xform_ipcomp.c projects/pnfs-planb-server/sys/netpfil/ipfw/ip_fw_sockopt.c projects/pnfs-planb-server/sys/netpfil/pf/pf.c projects/pnfs-planb-server/sys/powerpc/ofw/ofw_machdep.c projects/pnfs-planb-server/sys/powerpc/powerpc/interrupt.c projects/pnfs-planb-server/sys/sys/kern_prefetch.h projects/pnfs-planb-server/sys/sys/malloc.h projects/pnfs-planb-server/sys/sys/mbuf.h projects/pnfs-planb-server/sys/sys/param.h projects/pnfs-planb-server/sys/sys/pmc.h projects/pnfs-planb-server/sys/sys/pmckern.h projects/pnfs-planb-server/sys/sys/pmclog.h projects/pnfs-planb-server/sys/sys/proc.h projects/pnfs-planb-server/sys/sys/queue.h projects/pnfs-planb-server/sys/sys/sockbuf.h projects/pnfs-planb-server/sys/sys/socket.h projects/pnfs-planb-server/sys/sys/socketvar.h projects/pnfs-planb-server/sys/sys/time.h projects/pnfs-planb-server/sys/sys/turnstile.h projects/pnfs-planb-server/sys/vm/uma.h projects/pnfs-planb-server/sys/vm/uma_core.c projects/pnfs-planb-server/sys/vm/uma_int.h projects/pnfs-planb-server/sys/vm/vm_map.c projects/pnfs-planb-server/sys/vm/vm_mmap.c projects/pnfs-planb-server/sys/vm/vm_page.c projects/pnfs-planb-server/sys/vm/vm_pageout.c projects/pnfs-planb-server/sys/vm/vm_unix.c projects/pnfs-planb-server/sys/x86/x86/cpu_machdep.c projects/pnfs-planb-server/sys/x86/x86/mp_x86.c Directory Properties: projects/pnfs-planb-server/sys/ (props changed) projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/ (props changed) projects/pnfs-planb-server/sys/contrib/dev/acpica/ (props changed) projects/pnfs-planb-server/sys/contrib/zstd/ (props changed) Modified: projects/pnfs-planb-server/sys/amd64/amd64/machdep.c ============================================================================== --- projects/pnfs-planb-server/sys/amd64/amd64/machdep.c Sat Jun 9 23:38:22 2018 (r334904) +++ projects/pnfs-planb-server/sys/amd64/amd64/machdep.c Sat Jun 9 23:45:05 2018 (r334905) @@ -1248,15 +1248,6 @@ getmemsize(caddr_t kmdp, u_int64_t first) } /* - * Make hole for "AP -> long mode" bootstrap code. The - * mp_bootaddress vector is only available when the kernel - * is configured to support APs and APs for the system start - * in real mode mode (e.g. SMP bare metal). - */ - if (init_ops.mp_bootaddress) - init_ops.mp_bootaddress(physmap, &physmap_idx); - - /* * Maxmem isn't the "maximum memory", it's one larger than the * highest page of the physical address space. It should be * called something like "Maxphyspage". We may adjust this @@ -1293,6 +1284,15 @@ getmemsize(caddr_t kmdp, u_int64_t first) if (atop(physmap[physmap_idx + 1]) != Maxmem && (boothowto & RB_VERBOSE)) printf("Physical memory use set to %ldK\n", Maxmem * 4); + + /* + * Make hole for "AP -> long mode" bootstrap code. The + * mp_bootaddress vector is only available when the kernel + * is configured to support APs and APs for the system start + * in real mode mode (e.g. SMP bare metal). + */ + if (init_ops.mp_bootaddress) + init_ops.mp_bootaddress(physmap, &physmap_idx); /* call pmap initialization to make new kernel address space */ pmap_bootstrap(&first); Modified: projects/pnfs-planb-server/sys/amd64/amd64/mp_machdep.c ============================================================================== --- projects/pnfs-planb-server/sys/amd64/amd64/mp_machdep.c Sat Jun 9 23:38:22 2018 (r334904) +++ projects/pnfs-planb-server/sys/amd64/amd64/mp_machdep.c Sat Jun 9 23:45:05 2018 (r334905) @@ -113,12 +113,16 @@ mp_bootaddress(vm_paddr_t *physmap, unsigned int *phys allocated = false; for (i = *physmap_idx; i <= *physmap_idx; i -= 2) { /* - * Find a memory region big enough below the 4GB boundary to - * store the initial page tables. Note that it needs to be - * aligned to a page boundary. + * Find a memory region big enough below the 4GB + * boundary to store the initial page tables. Region + * must be mapped by the direct map. + * + * Note that it needs to be aligned to a page + * boundary. */ - if (physmap[i] >= GiB(4) || - (physmap[i + 1] - round_page(physmap[i])) < (PAGE_SIZE * 3)) + if (physmap[i] >= GiB(4) || physmap[i + 1] - + round_page(physmap[i]) < PAGE_SIZE * 3 || + physmap[i + 1] > Maxmem) continue; allocated = true; Modified: projects/pnfs-planb-server/sys/amd64/amd64/pmap.c ============================================================================== --- projects/pnfs-planb-server/sys/amd64/amd64/pmap.c Sat Jun 9 23:38:22 2018 (r334904) +++ projects/pnfs-planb-server/sys/amd64/amd64/pmap.c Sat Jun 9 23:45:05 2018 (r334905) @@ -513,7 +513,7 @@ pmap_delayed_invl_finished(void) pmap_invl_gen = invl_gen->gen; if (ts != NULL) { turnstile_broadcast(ts, TS_SHARED_QUEUE); - turnstile_unpend(ts, TS_SHARED_LOCK); + turnstile_unpend(ts); } turnstile_chain_unlock(&invl_gen_ts); } else { Modified: projects/pnfs-planb-server/sys/amd64/amd64/support.S ============================================================================== --- projects/pnfs-planb-server/sys/amd64/amd64/support.S Sat Jun 9 23:38:22 2018 (r334904) +++ projects/pnfs-planb-server/sys/amd64/amd64/support.S Sat Jun 9 23:45:05 2018 (r334905) @@ -40,37 +40,31 @@ .text -/* - * bcopy family - * void bzero(void *buf, u_int len) - */ - -/* done */ -ENTRY(bzero) +/* Address: %rdi */ +ENTRY(pagezero) PUSH_FRAME_POINTER - movq %rsi,%rcx + movq $PAGE_SIZE/8,%rcx xorl %eax,%eax - shrq $3,%rcx rep stosq - movq %rsi,%rcx - andq $7,%rcx - rep - stosb POP_FRAME_POINTER ret -END(bzero) +END(pagezero) -/* Address: %rdi */ -ENTRY(pagezero) +/* + * pagecopy(%rdi=from, %rsi=to) + */ +ENTRY(pagecopy) PUSH_FRAME_POINTER movq $PAGE_SIZE/8,%rcx - xorl %eax,%eax + movq %rdi,%r9 + movq %rsi,%rdi + movq %r9,%rsi rep - stosq + movsq POP_FRAME_POINTER ret -END(pagezero) +END(pagecopy) /* Address: %rdi */ ENTRY(sse2_pagezero) @@ -96,95 +90,7 @@ ENTRY(sse2_pagezero) ret END(sse2_pagezero) -ENTRY(bcmp) - PUSH_FRAME_POINTER - test %rdx,%rdx - je 1f - cmpq $64,%rdx - jg 4f - - xor %ecx,%ecx -2: - movzbl (%rdi,%rcx,1),%eax - movzbl (%rsi,%rcx,1),%r8d - cmp %r8b,%al - jne 3f - add $0x1,%rcx - cmp %rcx,%rdx - jne 2b -1: - xor %eax,%eax - POP_FRAME_POINTER - retq -3: - mov $1,%eax - POP_FRAME_POINTER - retq -4: - movq %rdx,%rcx - shrq $3,%rcx - repe - cmpsq - jne 5f - - movq %rdx,%rcx - andq $7,%rcx - repe - cmpsb -5: - setne %al - movsbl %al,%eax - POP_FRAME_POINTER - ret -END(bcmp) - /* - * bcopy(src, dst, cnt) - * rdi, rsi, rdx - * ws@tools.de (Wolfgang Solfrank, TooLs GmbH) +49-228-985800 - */ -ENTRY(bcopy) - PUSH_FRAME_POINTER - xchgq %rsi,%rdi - movq %rdx,%rcx - - movq %rdi,%rax - subq %rsi,%rax - cmpq %rcx,%rax /* overlapping && src < dst? */ - jb 1f - - shrq $3,%rcx /* copy by 64-bit words */ - rep - movsq - movq %rdx,%rcx - andq $7,%rcx /* any bytes left? */ - rep - movsb - POP_FRAME_POINTER - ret - - /* ALIGN_TEXT */ -1: - addq %rcx,%rdi /* copy backwards */ - addq %rcx,%rsi - decq %rdi - decq %rsi - andq $7,%rcx /* any fractional bytes? */ - std - rep - movsb - movq %rdx,%rcx /* copy remainder by 32-bit words */ - shrq $3,%rcx - subq $7,%rsi - subq $7,%rdi - rep - movsq - cld - POP_FRAME_POINTER - ret -END(bcopy) - -/* * memmove(dst, src, cnt) * rdi, rsi, rdx * Adapted from bcopy written by: @@ -271,8 +177,9 @@ ENTRY(memset) PUSH_FRAME_POINTER movq %rdi,%r9 movq %rdx,%rcx + movzbq %sil,%r8 movabs $0x0101010101010101,%rax - imulq %rsi,%rax + imulq %r8,%rax shrq $3,%rcx rep stosq @@ -289,21 +196,6 @@ ENTRY(memset) POP_FRAME_POINTER ret END(memset) - -/* - * pagecopy(%rdi=from, %rsi=to) - */ -ENTRY(pagecopy) - PUSH_FRAME_POINTER - movq $PAGE_SIZE/8,%rcx - movq %rdi,%r9 - movq %rsi,%rdi - movq %r9,%rsi - rep - movsq - POP_FRAME_POINTER - ret -END(pagecopy) /* fillw(pat, base, cnt) */ /* %rdi,%rsi, %rdx */ Modified: projects/pnfs-planb-server/sys/amd64/amd64/trap.c ============================================================================== --- projects/pnfs-planb-server/sys/amd64/amd64/trap.c Sat Jun 9 23:38:22 2018 (r334904) +++ projects/pnfs-planb-server/sys/amd64/amd64/trap.c Sat Jun 9 23:45:05 2018 (r334905) @@ -214,7 +214,7 @@ trap(struct trapframe *frame) * the NMI was consumed by it and we can return immediately. */ if (pmc_intr != NULL && - (*pmc_intr)(PCPU_GET(cpuid), frame) != 0) + (*pmc_intr)(frame) != 0) return; #endif @@ -770,7 +770,8 @@ trap_pfault(struct trapframe *frame, int usermode) * If nx protection of the usermode portion of kernel page * tables caused trap, panic. */ - if (pti && usermode && pg_nx != 0 && (frame->tf_err & (PGEX_P | PGEX_W | + if (PCPU_GET(curpmap)->pm_ucr3 != PMAP_NO_CR3 && usermode && + pg_nx != 0 && (frame->tf_err & (PGEX_P | PGEX_W | PGEX_U | PGEX_I)) == (PGEX_P | PGEX_U | PGEX_I) && (curpcb->pcb_saved_ucr3 & ~CR3_PCID_MASK)== (PCPU_GET(curpmap)->pm_cr3 & ~CR3_PCID_MASK)) Modified: projects/pnfs-planb-server/sys/amd64/include/cpufunc.h ============================================================================== --- projects/pnfs-planb-server/sys/amd64/include/cpufunc.h Sat Jun 9 23:38:22 2018 (r334904) +++ projects/pnfs-planb-server/sys/amd64/include/cpufunc.h Sat Jun 9 23:45:05 2018 (r334905) @@ -386,6 +386,15 @@ rdtsc(void) return (low | ((uint64_t)high << 32)); } +static __inline uint64_t +rdtscp(void) +{ + uint32_t low, high; + + __asm __volatile("rdtscp" : "=a" (low), "=d" (high) : : "ecx"); + return (low | ((uint64_t)high << 32)); +} + static __inline uint32_t rdtsc32(void) { Modified: projects/pnfs-planb-server/sys/amd64/include/pmc_mdep.h ============================================================================== --- projects/pnfs-planb-server/sys/amd64/include/pmc_mdep.h Sat Jun 9 23:38:22 2018 (r334904) +++ projects/pnfs-planb-server/sys/amd64/include/pmc_mdep.h Sat Jun 9 23:45:05 2018 (r334905) @@ -73,7 +73,6 @@ struct pmc_mdep; union pmc_md_op_pmcallocate { struct pmc_md_amd_op_pmcallocate pm_amd; - struct pmc_md_iaf_op_pmcallocate pm_iaf; struct pmc_md_iap_op_pmcallocate pm_iap; struct pmc_md_ucf_op_pmcallocate pm_ucf; struct pmc_md_ucp_op_pmcallocate pm_ucp; Modified: projects/pnfs-planb-server/sys/arm/arm/pmu.c ============================================================================== --- projects/pnfs-planb-server/sys/arm/arm/pmu.c Sat Jun 9 23:38:22 2018 (r334904) +++ projects/pnfs-planb-server/sys/arm/arm/pmu.c Sat Jun 9 23:45:05 2018 (r334905) @@ -123,7 +123,7 @@ pmu_intr(void *arg) /* Only call into the HWPMC framework if we know there is work. */ if (r != 0 && pmc_intr) { tf = arg; - (*pmc_intr)(PCPU_GET(cpuid), tf); + (*pmc_intr)(tf); } #endif Modified: projects/pnfs-planb-server/sys/arm/conf/GENERIC-NODEBUG ============================================================================== --- projects/pnfs-planb-server/sys/arm/conf/GENERIC-NODEBUG Sat Jun 9 23:38:22 2018 (r334904) +++ projects/pnfs-planb-server/sys/arm/conf/GENERIC-NODEBUG Sat Jun 9 23:45:05 2018 (r334905) @@ -34,7 +34,5 @@ nooptions INVARIANTS nooptions INVARIANT_SUPPORT nooptions WITNESS nooptions WITNESS_SKIPSPIN -nooptions BUF_TRACKING nooptions DEADLKRES -nooptions FULL_BUF_TRACKING Modified: projects/pnfs-planb-server/sys/arm/xscale/ixp425/files.ixp425 ============================================================================== --- projects/pnfs-planb-server/sys/arm/xscale/ixp425/files.ixp425 Sat Jun 9 23:38:22 2018 (r334904) +++ projects/pnfs-planb-server/sys/arm/xscale/ixp425/files.ixp425 Sat Jun 9 23:45:05 2018 (r334905) @@ -13,7 +13,6 @@ arm/xscale/ixp425/uart_bus_ixp425.c optional uart arm/xscale/ixp425/ixp425_a4x_space.c optional uart arm/xscale/ixp425/ixp425_a4x_io.S optional uart dev/cfi/cfi_bus_ixp4xx.c optional cfi -dev/hwpmc/hwpmc_xscale.c optional hwpmc dev/uart/uart_dev_ns8250.c optional uart # # NPE-based Ethernet support (requires qmgr also). Modified: projects/pnfs-planb-server/sys/arm64/arm64/swtch.S ============================================================================== --- projects/pnfs-planb-server/sys/arm64/arm64/swtch.S Sat Jun 9 23:38:22 2018 (r334904) +++ projects/pnfs-planb-server/sys/arm64/arm64/swtch.S Sat Jun 9 23:45:05 2018 (r334905) @@ -165,10 +165,9 @@ ENTRY(cpu_switch) mov x0, x19 /* - * Release the old thread. This doesn't need to be a store-release - * as the above dsb instruction will provide release semantics. + * Release the old thread. */ - str x2, [x0, #TD_LOCK] + stlr x2, [x0, #TD_LOCK] #if defined(SCHED_ULE) && defined(SMP) /* Spin if TD_LOCK points to a blocked_lock */ ldr x2, =_C_LABEL(blocked_lock) Modified: projects/pnfs-planb-server/sys/arm64/conf/GENERIC-NODEBUG ============================================================================== --- projects/pnfs-planb-server/sys/arm64/conf/GENERIC-NODEBUG Sat Jun 9 23:38:22 2018 (r334904) +++ projects/pnfs-planb-server/sys/arm64/conf/GENERIC-NODEBUG Sat Jun 9 23:45:05 2018 (r334905) @@ -34,7 +34,5 @@ nooptions INVARIANTS nooptions INVARIANT_SUPPORT nooptions WITNESS nooptions WITNESS_SKIPSPIN -nooptions BUF_TRACKING nooptions DEADLKRES -nooptions FULL_BUF_TRACKING nooptions USB_DEBUG Modified: projects/pnfs-planb-server/sys/cam/mmc/mmc_da.c ============================================================================== --- projects/pnfs-planb-server/sys/cam/mmc/mmc_da.c Sat Jun 9 23:38:22 2018 (r334904) +++ projects/pnfs-planb-server/sys/cam/mmc/mmc_da.c Sat Jun 9 23:45:05 2018 (r334905) @@ -171,7 +171,7 @@ static void sdda_start_init_task(void *context, int pe static void sdda_process_mmc_partitions(struct cam_periph *periph, union ccb *start_ccb); static uint32_t sdda_get_host_caps(struct cam_periph *periph, union ccb *ccb); static void sdda_init_switch_part(struct cam_periph *periph, union ccb *start_ccb, u_int part); - +static int mmc_select_card(struct cam_periph *periph, union ccb *ccb, uint32_t rca); static inline uint32_t mmc_get_sector_size(struct cam_periph *periph) {return MMC_SECTOR_SIZE;} /* TODO: actually issue GET_TRAN_SETTINGS to get R/O status */ @@ -901,6 +901,38 @@ mmc_switch_fill_mmcio(union ccb *ccb, } static int +mmc_select_card(struct cam_periph *periph, union ccb *ccb, uint32_t rca) +{ + int flags; + + flags = (rca ? MMC_RSP_R1B : MMC_RSP_NONE) | MMC_CMD_AC; + cam_fill_mmcio(&ccb->mmcio, + /*retries*/ 0, + /*cbfcnp*/ NULL, + /*flags*/ CAM_DIR_IN, + /*mmc_opcode*/ MMC_SELECT_CARD, + /*mmc_arg*/ rca << 16, + /*mmc_flags*/ flags, + /*mmc_data*/ NULL, + /*timeout*/ 0); + + cam_periph_runccb(ccb, sddaerror, CAM_FLAG_NONE, /*sense_flags*/0, NULL); + + if (((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP)) { + if (ccb->mmcio.cmd.error != 0) { + CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_PERIPH, + ("%s: MMC_SELECT command failed", __func__)); + return EIO; + } + return 0; /* Normal return */ + } else { + CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_PERIPH, + ("%s: CAM request failed\n", __func__)); + return EIO; + } +} + +static int mmc_switch(struct cam_periph *periph, union ccb *ccb, uint8_t set, uint8_t index, uint8_t value, u_int timeout) { @@ -953,18 +985,24 @@ mmc_sd_switch(struct cam_periph *periph, union ccb *cc uint8_t *res) { struct mmc_data mmc_d; + uint32_t arg; memset(res, 0, 64); mmc_d.len = 64; mmc_d.data = res; mmc_d.flags = MMC_DATA_READ; + arg = mode << 31; /* 0 - check, 1 - set */ + arg |= 0x00FFFFFF; + arg &= ~(0xF << (grp * 4)); + arg |= value << (grp * 4); + cam_fill_mmcio(&ccb->mmcio, /*retries*/ 0, /*cbfcnp*/ NULL, /*flags*/ CAM_DIR_IN, /*mmc_opcode*/ SD_SWITCH_FUNC, - /*mmc_arg*/ mode << 31, + /*mmc_arg*/ arg, /*mmc_flags*/ MMC_RSP_R1 | MMC_CMD_ADTC, /*mmc_data*/ &mmc_d, /*timeout*/ 0); @@ -1273,6 +1311,19 @@ sdda_start_init(void *context, union ccb *start_ccb) CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, ("Card supports HS\n")); softc->card_f_max = SD_HS_MAX; } + + /* + * We deselect then reselect the card here. Some cards + * become unselected and timeout with the above two + * commands, although the state tables / diagrams in the + * standard suggest they go back to the transfer state. + * Other cards don't become deselected, and if we + * attempt to blindly re-select them, we get timeout + * errors from some controllers. So we deselect then + * reselect to handle all situations. + */ + mmc_select_card(periph, start_ccb, 0); + mmc_select_card(periph, start_ccb, get_rca(periph)); } else { CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, ("Not trying the switch\n")); goto finish_hs_tests; @@ -1293,6 +1344,15 @@ finish_hs_tests: f_max = min(host_f_max, softc->card_f_max); CAM_DEBUG(periph->path, CAM_DEBUG_PERIPH, ("Set SD freq to %d MHz (min out of host f=%d MHz and card f=%d MHz)\n", f_max / 1000000, host_f_max / 1000000, softc->card_f_max / 1000000)); + /* Enable high-speed timing on the card */ + if (f_max > 25000000) { + err = mmc_set_timing(periph, start_ccb, bus_timing_hs); + if (err != MMC_ERR_NONE) { + CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("Cannot switch card to high-speed mode")); + f_max = 25000000; + } + } + /* Set frequency on the controller */ start_ccb->ccb_h.func_code = XPT_SET_TRAN_SETTINGS; start_ccb->ccb_h.flags = CAM_DIR_NONE; start_ccb->ccb_h.retry_count = 0; @@ -1326,12 +1386,6 @@ finish_hs_tests: bus_width_str(max_host_bus_width), bus_width_str(max_card_bus_width))); sdda_set_bus_width(periph, start_ccb, desired_bus_width); - - if (f_max > 25000000) { - err = mmc_set_timing(periph, start_ccb, bus_timing_hs); - if (err != MMC_ERR_NONE) - CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("Cannot switch card to high-speed mode")); - } softc->state = SDDA_STATE_NORMAL; Modified: projects/pnfs-planb-server/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c ============================================================================== --- projects/pnfs-planb-server/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Sat Jun 9 23:38:22 2018 (r334904) +++ projects/pnfs-planb-server/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c Sat Jun 9 23:45:05 2018 (r334905) @@ -173,3 +173,9 @@ taskq_wait(taskq_t *tq) { taskqueue_drain_all(tq->tq_queue); } + +void +taskq_wait_id(taskq_t *tq, taskqid_t id) +{ + taskq_wait(tq); +} Modified: projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Jun 9 23:38:22 2018 (r334904) +++ projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Jun 9 23:45:05 2018 (r334905) @@ -339,7 +339,8 @@ int arc_no_grow_shift = 5; * minimum lifespan of a prefetch block in clock ticks * (initialized in arc_init()) */ -static int arc_min_prefetch_lifespan; +static int zfs_arc_min_prefetch_ms = 1; +static int zfs_arc_min_prescient_prefetch_ms = 6; /* * If this percent of memory is free, don't throttle. @@ -779,8 +780,9 @@ typedef struct arc_stats { kstat_named_t arcstat_meta_limit; kstat_named_t arcstat_meta_max; kstat_named_t arcstat_meta_min; - kstat_named_t arcstat_sync_wait_for_async; + kstat_named_t arcstat_async_upgrade_sync; kstat_named_t arcstat_demand_hit_predictive_prefetch; + kstat_named_t arcstat_demand_hit_prescient_prefetch; } arc_stats_t; static arc_stats_t arc_stats = { @@ -877,8 +879,9 @@ static arc_stats_t arc_stats = { { "arc_meta_limit", KSTAT_DATA_UINT64 }, { "arc_meta_max", KSTAT_DATA_UINT64 }, { "arc_meta_min", KSTAT_DATA_UINT64 }, - { "sync_wait_for_async", KSTAT_DATA_UINT64 }, + { "async_upgrade_sync", KSTAT_DATA_UINT64 }, { "demand_hit_predictive_prefetch", KSTAT_DATA_UINT64 }, + { "demand_hit_prescient_prefetch", KSTAT_DATA_UINT64 }, }; #define ARCSTAT(stat) (arc_stats.stat.value.ui64) @@ -974,22 +977,23 @@ typedef struct arc_callback arc_callback_t; struct arc_callback { void *acb_private; - arc_done_func_t *acb_done; + arc_read_done_func_t *acb_done; arc_buf_t *acb_buf; boolean_t acb_compressed; zio_t *acb_zio_dummy; + zio_t *acb_zio_head; arc_callback_t *acb_next; }; typedef struct arc_write_callback arc_write_callback_t; struct arc_write_callback { - void *awcb_private; - arc_done_func_t *awcb_ready; - arc_done_func_t *awcb_children_ready; - arc_done_func_t *awcb_physdone; - arc_done_func_t *awcb_done; - arc_buf_t *awcb_buf; + void *awcb_private; + arc_write_done_func_t *awcb_ready; + arc_write_done_func_t *awcb_children_ready; + arc_write_done_func_t *awcb_physdone; + arc_write_done_func_t *awcb_done; + arc_buf_t *awcb_buf; }; /* @@ -1229,6 +1233,8 @@ sysctl_vfs_zfs_arc_min(SYSCTL_HANDLER_ARGS) #define HDR_IO_IN_PROGRESS(hdr) ((hdr)->b_flags & ARC_FLAG_IO_IN_PROGRESS) #define HDR_IO_ERROR(hdr) ((hdr)->b_flags & ARC_FLAG_IO_ERROR) #define HDR_PREFETCH(hdr) ((hdr)->b_flags & ARC_FLAG_PREFETCH) +#define HDR_PRESCIENT_PREFETCH(hdr) \ + ((hdr)->b_flags & ARC_FLAG_PRESCIENT_PREFETCH) #define HDR_COMPRESSION_ENABLED(hdr) \ ((hdr)->b_flags & ARC_FLAG_COMPRESSED_ARC) @@ -1392,6 +1398,11 @@ SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, mfu_ghost_data_esize, SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, l2c_only_size, CTLFLAG_RD, &ARC_l2c_only.arcs_size.rc_count, 0, "size of mru state"); +SYSCTL_UINT(_vfs_zfs, OID_AUTO, arc_min_prfetch_ms, CTLFLAG_RW, + &zfs_arc_min_prefetch_ms, 0, "Min life of prefetch block in ms"); +SYSCTL_UINT(_vfs_zfs, OID_AUTO, arc_min_prescient_prefetch_ms, CTLFLAG_RW, + &zfs_arc_min_prescient_prefetch_ms, 0, "Min life oof prescient prefetched block in ms"); + /* * L2ARC Internals */ @@ -3544,6 +3555,8 @@ arc_evict_hdr(arc_buf_hdr_t *hdr, kmutex_t *hash_lock) { arc_state_t *evicted_state, *state; int64_t bytes_evicted = 0; + int min_lifetime = HDR_PRESCIENT_PREFETCH(hdr) ? + zfs_arc_min_prescient_prefetch_ms : zfs_arc_min_prefetch_ms; ASSERT(MUTEX_HELD(hash_lock)); ASSERT(HDR_HAS_L1HDR(hdr)); @@ -3596,8 +3609,7 @@ arc_evict_hdr(arc_buf_hdr_t *hdr, kmutex_t *hash_lock) /* prefetch buffers have a minimum lifespan */ if (HDR_IO_IN_PROGRESS(hdr) || ((hdr->b_flags & (ARC_FLAG_PREFETCH | ARC_FLAG_INDIRECT)) && - ddi_get_lbolt() - hdr->b_l1hdr.b_arc_access < - arc_min_prefetch_lifespan)) { + ddi_get_lbolt() - hdr->b_l1hdr.b_arc_access < min_lifetime * hz)) { ARCSTAT_BUMP(arcstat_evict_skip); return (bytes_evicted); } @@ -4968,13 +4980,15 @@ arc_access(arc_buf_hdr_t *hdr, kmutex_t *hash_lock) * - move the buffer to the head of the list if this is * another prefetch (to make it less likely to be evicted). */ - if (HDR_PREFETCH(hdr)) { + if (HDR_PREFETCH(hdr) || HDR_PRESCIENT_PREFETCH(hdr)) { if (refcount_count(&hdr->b_l1hdr.b_refcnt) == 0) { /* link protected by hash lock */ ASSERT(multilist_link_active( &hdr->b_l1hdr.b_arc_node)); } else { - arc_hdr_clear_flags(hdr, ARC_FLAG_PREFETCH); + arc_hdr_clear_flags(hdr, + ARC_FLAG_PREFETCH | + ARC_FLAG_PRESCIENT_PREFETCH); ARCSTAT_BUMP(arcstat_mru_hits); } hdr->b_l1hdr.b_arc_access = now; @@ -5005,10 +5019,13 @@ arc_access(arc_buf_hdr_t *hdr, kmutex_t *hash_lock) * MFU state. */ - if (HDR_PREFETCH(hdr)) { + if (HDR_PREFETCH(hdr) || HDR_PRESCIENT_PREFETCH(hdr)) { new_state = arc_mru; - if (refcount_count(&hdr->b_l1hdr.b_refcnt) > 0) - arc_hdr_clear_flags(hdr, ARC_FLAG_PREFETCH); + if (refcount_count(&hdr->b_l1hdr.b_refcnt) > 0) { + arc_hdr_clear_flags(hdr, + ARC_FLAG_PREFETCH | + ARC_FLAG_PRESCIENT_PREFETCH); + } DTRACE_PROBE1(new_state__mru, arc_buf_hdr_t *, hdr); } else { new_state = arc_mfu; @@ -5029,11 +5046,7 @@ arc_access(arc_buf_hdr_t *hdr, kmutex_t *hash_lock) * If it was a prefetch, we will explicitly move it to * the head of the list now. */ - if ((HDR_PREFETCH(hdr)) != 0) { - ASSERT(refcount_is_zero(&hdr->b_l1hdr.b_refcnt)); - /* link protected by hash_lock */ - ASSERT(multilist_link_active(&hdr->b_l1hdr.b_arc_node)); - } + ARCSTAT_BUMP(arcstat_mfu_hits); hdr->b_l1hdr.b_arc_access = ddi_get_lbolt(); } else if (hdr->b_l1hdr.b_state == arc_mfu_ghost) { @@ -5044,12 +5057,11 @@ arc_access(arc_buf_hdr_t *hdr, kmutex_t *hash_lock) * MFU state. */ - if (HDR_PREFETCH(hdr)) { + if (HDR_PREFETCH(hdr) || HDR_PRESCIENT_PREFETCH(hdr)) { /* * This is a prefetch access... * move this block back to the MRU state. */ - ASSERT0(refcount_count(&hdr->b_l1hdr.b_refcnt)); new_state = arc_mru; } @@ -5116,23 +5128,28 @@ arc_buf_access(arc_buf_t *buf) demand, prefetch, !HDR_ISTYPE_METADATA(hdr), data, metadata, hits); } -/* a generic arc_done_func_t which you can use */ +/* a generic arc_read_done_func_t which you can use */ /* ARGSUSED */ void -arc_bcopy_func(zio_t *zio, arc_buf_t *buf, void *arg) +arc_bcopy_func(zio_t *zio, const zbookmark_phys_t *zb, const blkptr_t *bp, + arc_buf_t *buf, void *arg) { - if (zio == NULL || zio->io_error == 0) - bcopy(buf->b_data, arg, arc_buf_size(buf)); + if (buf == NULL) + return; + + bcopy(buf->b_data, arg, arc_buf_size(buf)); arc_buf_destroy(buf, arg); } -/* a generic arc_done_func_t */ +/* a generic arc_read_done_func_t */ +/* ARGSUSED */ void -arc_getbuf_func(zio_t *zio, arc_buf_t *buf, void *arg) +arc_getbuf_func(zio_t *zio, const zbookmark_phys_t *zb, const blkptr_t *bp, + arc_buf_t *buf, void *arg) { arc_buf_t **bufp = arg; - if (zio && zio->io_error) { - arc_buf_destroy(buf, arg); + + if (buf == NULL) { *bufp = NULL; } else { *bufp = buf; @@ -5164,7 +5181,6 @@ arc_read_done(zio_t *zio) arc_callback_t *callback_list; arc_callback_t *acb; boolean_t freeable = B_FALSE; - boolean_t no_zio_error = (zio->io_error == 0); /* * The hdr was inserted into hash-table and removed from lists @@ -5190,7 +5206,7 @@ arc_read_done(zio_t *zio) ASSERT3P(hash_lock, !=, NULL); } - if (no_zio_error) { + if (zio->io_error == 0) { /* byteswap if necessary */ if (BP_SHOULD_BYTESWAP(zio->io_bp)) { if (BP_GET_LEVEL(zio->io_bp) > 0) { @@ -5211,7 +5227,8 @@ arc_read_done(zio_t *zio) callback_list = hdr->b_l1hdr.b_acb; ASSERT3P(callback_list, !=, NULL); - if (hash_lock && no_zio_error && hdr->b_l1hdr.b_state == arc_anon) { + if (hash_lock && zio->io_error == 0 && + hdr->b_l1hdr.b_state == arc_anon) { /* * Only call arc_access on anonymous buffers. This is because * if we've issued an I/O for an evicted buffer, we've already @@ -5232,14 +5249,21 @@ arc_read_done(zio_t *zio) if (!acb->acb_done) continue; - /* This is a demand read since prefetches don't use callbacks */ callback_cnt++; + if (zio->io_error != 0) + continue; + int error = arc_buf_alloc_impl(hdr, acb->acb_private, - acb->acb_compressed, no_zio_error, &acb->acb_buf); - if (no_zio_error) { - zio->io_error = error; + acb->acb_compressed, + B_TRUE, &acb->acb_buf); + if (error != 0) { + arc_buf_destroy(acb->acb_buf, acb->acb_private); + acb->acb_buf = NULL; } + + if (zio->io_error == 0) + zio->io_error = error; } hdr->b_l1hdr.b_acb = NULL; arc_hdr_clear_flags(hdr, ARC_FLAG_IO_IN_PROGRESS); @@ -5252,7 +5276,7 @@ arc_read_done(zio_t *zio) ASSERT(refcount_is_zero(&hdr->b_l1hdr.b_refcnt) || callback_list != NULL); - if (no_zio_error) { + if (zio->io_error == 0) { arc_hdr_verify(hdr, zio->io_bp); } else { arc_hdr_set_flags(hdr, ARC_FLAG_IO_ERROR); @@ -5285,8 +5309,10 @@ arc_read_done(zio_t *zio) /* execute each callback and free its structure */ while ((acb = callback_list) != NULL) { - if (acb->acb_done) - acb->acb_done(zio, acb->acb_buf, acb->acb_private); + if (acb->acb_done) { + acb->acb_done(zio, &zio->io_bookmark, zio->io_bp, + acb->acb_buf, acb->acb_private); + } if (acb->acb_zio_dummy != NULL) { acb->acb_zio_dummy->io_error = zio->io_error; @@ -5320,7 +5346,7 @@ arc_read_done(zio_t *zio) * for readers of this block. */ int -arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_done_func_t *done, +arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_read_done_func_t *done, void *private, zio_priority_t priority, int zio_flags, arc_flags_t *arc_flags, const zbookmark_phys_t *zb) { @@ -5329,7 +5355,8 @@ arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, a zio_t *rzio; uint64_t guid = spa_load_guid(spa); boolean_t compressed_read = (zio_flags & ZIO_FLAG_RAW) != 0; - + int rc = 0; + ASSERT(!BP_IS_EMBEDDED(bp) || BPE_GET_ETYPE(bp) == BP_EMBEDDED_TYPE_DATA); @@ -5347,32 +5374,20 @@ top: *arc_flags |= ARC_FLAG_CACHED; if (HDR_IO_IN_PROGRESS(hdr)) { + zio_t *head_zio = hdr->b_l1hdr.b_acb->acb_zio_head; + ASSERT3P(head_zio, !=, NULL); if ((hdr->b_flags & ARC_FLAG_PRIO_ASYNC_READ) && priority == ZIO_PRIORITY_SYNC_READ) { /* - * This sync read must wait for an - * in-progress async read (e.g. a predictive - * prefetch). Async reads are queued - * separately at the vdev_queue layer, so - * this is a form of priority inversion. - * Ideally, we would "inherit" the demand - * i/o's priority by moving the i/o from - * the async queue to the synchronous queue, - * but there is currently no mechanism to do - * so. Track this so that we can evaluate - * the magnitude of this potential performance - * problem. - * - * Note that if the prefetch i/o is already - * active (has been issued to the device), - * the prefetch improved performance, because - * we issued it sooner than we would have - * without the prefetch. + * This is a sync read that needs to wait for + * an in-flight async read. Request that the + * zio have its priority upgraded. */ - DTRACE_PROBE1(arc__sync__wait__for__async, + zio_change_priority(head_zio, priority); + DTRACE_PROBE1(arc__async__upgrade__sync, arc_buf_hdr_t *, hdr); - ARCSTAT_BUMP(arcstat_sync_wait_for_async); + ARCSTAT_BUMP(arcstat_async_upgrade_sync); } if (hdr->b_flags & ARC_FLAG_PREDICTIVE_PREFETCH) { arc_hdr_clear_flags(hdr, @@ -5399,6 +5414,7 @@ top: spa, NULL, NULL, NULL, zio_flags); ASSERT3P(acb->acb_done, !=, NULL); + acb->acb_zio_head = head_zio; acb->acb_next = hdr->b_l1hdr.b_acb; hdr->b_l1hdr.b_acb = acb; mutex_exit(hash_lock); @@ -5426,17 +5442,32 @@ top: arc_hdr_clear_flags(hdr, ARC_FLAG_PREDICTIVE_PREFETCH); } - ASSERT(!BP_IS_EMBEDDED(bp) || !BP_IS_HOLE(bp)); + if (hdr->b_flags & ARC_FLAG_PRESCIENT_PREFETCH) { + ARCSTAT_BUMP( + arcstat_demand_hit_prescient_prefetch); + arc_hdr_clear_flags(hdr, + ARC_FLAG_PRESCIENT_PREFETCH); + } + + ASSERT(!BP_IS_EMBEDDED(bp) || !BP_IS_HOLE(bp)); /* Get a buf with the desired data in it. */ - VERIFY0(arc_buf_alloc_impl(hdr, private, - compressed_read, B_TRUE, &buf)); + rc = arc_buf_alloc_impl(hdr, private, + compressed_read, B_TRUE, &buf); + if (rc != 0) { + arc_buf_destroy(buf, private); + buf = NULL; + } + ASSERT((zio_flags & ZIO_FLAG_SPECULATIVE) || + rc == 0 || rc != ENOENT); } else if (*arc_flags & ARC_FLAG_PREFETCH && refcount_count(&hdr->b_l1hdr.b_refcnt) == 0) { arc_hdr_set_flags(hdr, ARC_FLAG_PREFETCH); } DTRACE_PROBE1(arc__hit, arc_buf_hdr_t *, hdr); arc_access(hdr, hash_lock); + if (*arc_flags & ARC_FLAG_PRESCIENT_PREFETCH) + arc_hdr_set_flags(hdr, ARC_FLAG_PRESCIENT_PREFETCH); if (*arc_flags & ARC_FLAG_L2CACHE) arc_hdr_set_flags(hdr, ARC_FLAG_L2CACHE); mutex_exit(hash_lock); @@ -5446,7 +5477,7 @@ top: data, metadata, hits); if (done) - done(NULL, buf, private); + done(NULL, zb, bp, buf, private); } else { uint64_t lsize = BP_GET_LSIZE(bp); uint64_t psize = BP_GET_PSIZE(bp); @@ -5520,6 +5551,9 @@ top: if (*arc_flags & ARC_FLAG_PREFETCH) arc_hdr_set_flags(hdr, ARC_FLAG_PREFETCH); + if (*arc_flags & ARC_FLAG_PRESCIENT_PREFETCH) + arc_hdr_set_flags(hdr, ARC_FLAG_PRESCIENT_PREFETCH); + if (*arc_flags & ARC_FLAG_L2CACHE) arc_hdr_set_flags(hdr, ARC_FLAG_L2CACHE); if (BP_GET_LEVEL(bp) > 0) @@ -5549,14 +5583,17 @@ top: vd = NULL; } - if (priority == ZIO_PRIORITY_ASYNC_READ) + /* + * We count both async reads and scrub IOs as asynchronous so + * that both can be upgraded in the event of a cache hit while + * the read IO is still in-flight. + */ + if (priority == ZIO_PRIORITY_ASYNC_READ || + priority == ZIO_PRIORITY_SCRUB) arc_hdr_set_flags(hdr, ARC_FLAG_PRIO_ASYNC_READ); else arc_hdr_clear_flags(hdr, ARC_FLAG_PRIO_ASYNC_READ); - if (hash_lock != NULL) - mutex_exit(hash_lock); - /* * At this point, we have a level 1 cache miss. Try again in * L2ARC if possible. @@ -5637,6 +5674,11 @@ top: ZIO_FLAG_CANFAIL | ZIO_FLAG_DONT_PROPAGATE | ZIO_FLAG_DONT_RETRY, B_FALSE); + acb->acb_zio_head = rzio; + + if (hash_lock != NULL) + mutex_exit(hash_lock); + DTRACE_PROBE2(l2arc__read, vdev_t *, vd, zio_t *, rzio); ARCSTAT_INCR(arcstat_l2_read_bytes, size); @@ -5651,6 +5693,8 @@ top: return (0); /* l2arc read error; goto zio_read() */ + if (hash_lock != NULL) + mutex_enter(hash_lock); } else { DTRACE_PROBE1(l2arc__miss, arc_buf_hdr_t *, hdr); @@ -5671,7 +5715,11 @@ top: rzio = zio_read(pio, spa, bp, hdr->b_l1hdr.b_pabd, size, arc_read_done, hdr, priority, zio_flags, zb); + acb->acb_zio_head = rzio; + if (hash_lock != NULL) + mutex_exit(hash_lock); + if (*arc_flags & ARC_FLAG_WAIT) return (zio_wait(rzio)); @@ -6162,9 +6210,9 @@ arc_write_done(zio_t *zio) zio_t * arc_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, arc_buf_t *buf, - boolean_t l2arc, const zio_prop_t *zp, arc_done_func_t *ready, - arc_done_func_t *children_ready, arc_done_func_t *physdone, - arc_done_func_t *done, void *private, zio_priority_t priority, + boolean_t l2arc, const zio_prop_t *zp, arc_write_done_func_t *ready, + arc_write_done_func_t *children_ready, arc_write_done_func_t *physdone, + arc_write_done_func_t *done, void *private, zio_priority_t priority, int zio_flags, const zbookmark_phys_t *zb) { arc_buf_hdr_t *hdr = buf->b_hdr; @@ -6590,9 +6638,6 @@ arc_init(void) mutex_init(&arc_dnlc_evicts_lock, NULL, MUTEX_DEFAULT, NULL); cv_init(&arc_dnlc_evicts_cv, NULL, CV_DEFAULT, NULL); - - /* Convert seconds to clock ticks */ - arc_min_prefetch_lifespan = 1 * hz; /* set min cache to 1/32 of all memory, or arc_abs_min, whichever is more */ arc_c_min = MAX(allmem / 32, arc_abs_min); Modified: projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sat Jun 9 23:38:22 2018 (r334904) +++ projects/pnfs-planb-server/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sat Jun 9 23:45:05 2018 (r334905) @@ -902,7 +902,8 @@ dbuf_whichblock(dnode_t *dn, int64_t level, uint64_t o } static void -dbuf_read_done(zio_t *zio, arc_buf_t *buf, void *vdb) +dbuf_read_done(zio_t *zio, const zbookmark_phys_t *zb, const blkptr_t *bp, + arc_buf_t *buf, void *vdb) { dmu_buf_impl_t *db = vdb; @@ -916,19 +917,22 @@ dbuf_read_done(zio_t *zio, arc_buf_t *buf, void *vdb) ASSERT(db->db.db_data == NULL); if (db->db_level == 0 && db->db_freed_in_flight) { /* we were freed in flight; disregard any error */ + if (buf == NULL) { + buf = arc_alloc_buf(db->db_objset->os_spa, + db, DBUF_GET_BUFC_TYPE(db), db->db.db_size); + } arc_release(buf, db); bzero(buf->b_data, db->db.db_size); arc_buf_freeze(buf); db->db_freed_in_flight = FALSE; dbuf_set_data(db, buf); db->db_state = DB_CACHED; - } else if (zio == NULL || zio->io_error == 0) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***