All of lore.kernel.org
 help / color / mirror / Atom feed
* Can I send UNMAP commands with FIO?
@ 2018-03-24  0:19 Jason Sirichoke
  2018-03-24  6:16 ` Sitsofe Wheeler
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Sirichoke @ 2018-03-24  0:19 UTC (permalink / raw)
  To: fio

Hi everyone,

I am trying to run a test to a device that only supports UNMAP commands
but not TRIM. So I am able to use sg_unmap successfully but it looks like
the trim commands sent by FIO fail as unsupported

Is there a way to easily configure or modify FIO to send UNMAP instead of
TRIM? These commands should be functionally very close to each other so
was hoping this might be possible.

Thanks,

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Can I send UNMAP commands with FIO?
  2018-03-24  0:19 Can I send UNMAP commands with FIO? Jason Sirichoke
@ 2018-03-24  6:16 ` Sitsofe Wheeler
  0 siblings, 0 replies; 2+ messages in thread
From: Sitsofe Wheeler @ 2018-03-24  6:16 UTC (permalink / raw)
  To: Jason Sirichoke; +Cc: fio

On 24 March 2018 at 00:19, Jason Sirichoke <jason.sirichoke@broadcom.com> wrote:
>
> I am trying to run a test to a device that only supports UNMAP commands
> but not TRIM. So I am able to use sg_unmap successfully but it looks like
> the trim commands sent by FIO fail as unsupported
>
> Is there a way to easily configure or modify FIO to send UNMAP instead of
> TRIM? These commands should be functionally very close to each other so
> was hoping this might be possible.

In short not unless you were to add the code to perform this to the sg
ioengine (where sending raw SCSI commands makes sense). Many ioengines
can cope with the generic block layer but at that layer you don't know
the disk below is truly a SCSI one (it might be SATA, NVMe etc). The
UNMAP command is specific to SCSI and even then only certain SCSI
disks - some SCSI disks implement unmapping via the WRITE SAME
command...

It's a pity your "SCSI disk" doesn't expose what's required for Linux
to enable discard (which is what regular fio engines are using to do
trim) and it might be worth your while quickly checking why. The last
time I ran into that situation was with old ESXi which didn't
advertise enough feature (see
https://stackoverflow.com/a/40817859/9109338 ).

-- 
Sitsofe | http://sucs.org/~sits/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-24  6:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-24  0:19 Can I send UNMAP commands with FIO? Jason Sirichoke
2018-03-24  6:16 ` Sitsofe Wheeler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.