From owner-svn-src-head@freebsd.org Mon Dec 16 19:16:27 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70B101CC73C; Mon, 16 Dec 2019 19:16:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47c9x72SnVz4DNq; Mon, 16 Dec 2019 19:16:27 +0000 (UTC) (envelope-from imp@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 4FDB61DA6; Mon, 16 Dec 2019 19:16:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBGJGRxW014845; Mon, 16 Dec 2019 19:16:27 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBGJGQ4k014843; Mon, 16 Dec 2019 19:16:26 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201912161916.xBGJGQ4k014843@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 16 Dec 2019 19:16:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355817 - in head/sys/cam: ata scsi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/cam: ata scsi X-SVN-Commit-Revision: 355817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Dec 2019 19:16:27 -0000 Author: imp Date: Mon Dec 16 19:16:26 2019 New Revision: 355817 URL: https://svnweb.freebsd.org/changeset/base/355817 Log: Revert r355813 It was extracted from a larger tree and is incomplete. Will resubmit after reworking. Modified: head/sys/cam/ata/ata_da.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Mon Dec 16 19:08:49 2019 (r355816) +++ head/sys/cam/ata/ata_da.c Mon Dec 16 19:16:26 2019 (r355817) @@ -858,10 +858,6 @@ static void adaresume(void *arg); #define ADA_DEFAULT_WRITE_CACHE 1 #endif -#ifndef ADA_DEFAULT_MAX_DELETE -#define ADA_DEFAULT_MAX_DELETE (1 * 1024 * 1024 * 1024) /* 1GB max trim by default */ -#endif - #define ADA_RA (softc->read_ahead >= 0 ? \ softc->read_ahead : ada_read_ahead) #define ADA_WC (softc->write_cache >= 0 ? \ @@ -882,7 +878,6 @@ static int ada_spindown_shutdown = ADA_DEFAULT_SPINDOW static int ada_spindown_suspend = ADA_DEFAULT_SPINDOWN_SUSPEND; static int ada_read_ahead = ADA_DEFAULT_READ_AHEAD; static int ada_write_cache = ADA_DEFAULT_WRITE_CACHE; -static int64_t ada_default_max_delete = ADA_DEFAULT_MAX_DELETE; static SYSCTL_NODE(_kern_cam, OID_AUTO, ada, CTLFLAG_RD, 0, "CAM Direct Access Disk driver"); @@ -900,9 +895,6 @@ SYSCTL_INT(_kern_cam_ada, OID_AUTO, read_ahead, CTLFLA &ada_read_ahead, 0, "Enable disk read-ahead"); SYSCTL_INT(_kern_cam_ada, OID_AUTO, write_cache, CTLFLAG_RWTUN, &ada_write_cache, 0, "Enable disk write cache"); -SYSCTL_QUAD(_kern_cam_ada, OID_AUTO, default_max_delete, CTLFLAG_RWTUN, - &ada_default_max_delete, 0, - "Default system wide maximum delete"); /* * ADA_ORDEREDTAG_INTERVAL determines how often, relative @@ -3400,8 +3392,6 @@ adasetgeom(struct ada_softc *softc, struct ccb_getdev softc->disk->d_delmaxsize = 256 * softc->params.secsize; } else softc->disk->d_delmaxsize = maxio; - if (softc->disk->d_delmaxsize > ada_default_max_delete) - softc->disk->d_delmaxsize = ada_default_max_delete; if ((softc->cpi.hba_misc & PIM_UNMAPPED) != 0) { d_flags |= DISKFLAG_UNMAPPED_BIO; softc->unmappedio = 1; Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Mon Dec 16 19:08:49 2019 (r355816) +++ head/sys/cam/scsi/scsi_da.c Mon Dec 16 19:16:26 2019 (r355817) @@ -1516,17 +1516,12 @@ static callout_func_t damediapoll; #define DA_DEFAULT_SEND_ORDERED 1 #endif -#ifndef DA_DEFAULT_MAX_DELETE -#define DA_DEFAULT_MAX_DELETE (1 * 1024 * 1024 * 1024) /* 1GB max trim by default */ -#endif - static int da_poll_period = DA_DEFAULT_POLL_PERIOD; static int da_retry_count = DA_DEFAULT_RETRY; static int da_default_timeout = DA_DEFAULT_TIMEOUT; static sbintime_t da_default_softtimeout = DA_DEFAULT_SOFTTIMEOUT; static int da_send_ordered = DA_DEFAULT_SEND_ORDERED; static int da_disable_wp_detection = 0; -static int64_t da_default_max_delete = DA_DEFAULT_MAX_DELETE; static SYSCTL_NODE(_kern_cam, OID_AUTO, da, CTLFLAG_RD, 0, "CAM Direct Access Disk driver"); @@ -1541,9 +1536,6 @@ SYSCTL_INT(_kern_cam_da, OID_AUTO, send_ordered, CTLFL SYSCTL_INT(_kern_cam_da, OID_AUTO, disable_wp_detection, CTLFLAG_RWTUN, &da_disable_wp_detection, 0, "Disable detection of write-protected disks"); -SYSCTL_INT64(_kern_cam_da, OID_AUTO, default_max_delete, CTLFLAG_RWTUN, - &da_default_max_delete, 0, - "Default system wide maximum delete"); SYSCTL_PROC(_kern_cam_da, OID_AUTO, default_softtimeout, CTLTYPE_UINT | CTLFLAG_RW, NULL, 0, dasysctlsofttimeout, "I", @@ -2508,8 +2500,8 @@ dadeletemaxsize(struct da_softc *softc, da_delete_meth return 0; } - return (off_t)MIN(da_default_max_delete, softc->params.secsize * - omin(sectors, softc->params.sectors)); + return (off_t)softc->params.secsize * + omin(sectors, softc->params.sectors); } static void