Revert r355813
It was extracted from a larger tree and is incomplete. Will resubmit after reworking.
This commit is contained in:
parent
16ae835140
commit
83b75bb3cc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=355817
@ -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_SPINDOWN_SHUTDOWN;
|
||||
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, CTLFLAG_RWTUN,
|
||||
&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 *cgd)
|
||||
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;
|
||||
|
@ -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, CTLFLAG_RWTUN,
|
||||
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_methods delete_method)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user