public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* discard_zeroes_data questions
@ 2015-11-09 23:08 Eric Sandeen
  2015-11-09 23:38 ` Darrick J. Wong
  2015-11-10  0:15 ` Martin K. Petersen
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Sandeen @ 2015-11-09 23:08 UTC (permalink / raw)
  To: Martin K. Petersen, linux-ext4@vger.kernel.org

Hi Martin (and linux-ext4 list...) 

tl;dr:

mke2fs today thinks that if discard_zeroes_data == 1 and a BLKDISCARD ioctl of the whole device succeeds, then we have guarantees that any blocks read back will be full of zero, and we don't need to initialize them to zero.  Is this ok?  (barring crappy hardware, that is).

slightly longer:

Does discard_zeroes_data == 1 mean that a discard *request* will guarantee zeroes on a read, or does it mean that a discard-request-which-actually-was-executed-and-not-ignored-as-just-a-hint will give us back zeroes on a read?  (because UNMAP is a hint, right?  I don't know about SATA trim ...)

I did see 7985090 sd: disable discard_zeroes_data for UNMAP - so I think that for v3.19+, on *scsi*, what e2fsprogs is doing is ok (now).

But I'm wondering about dm-thin and SATA, too, so trying to figure out what discard_zeroes_data really implies.  That after a BLKDISCARD, a read *will* return zeros, or that it'll return zeros *iff* the hint is taken?

I hope that made sense, but I've been communicating badly today.  ;)

Thanks,
-Eric

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

end of thread, other threads:[~2015-11-10  0:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-09 23:08 discard_zeroes_data questions Eric Sandeen
2015-11-09 23:38 ` Darrick J. Wong
2015-11-10  0:16   ` Martin K. Petersen
2015-11-10  0:15 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox