On Thu 05-11-15 04:18:49, Elliott, Robert (Persistent Memory) wrote:
> 
> > -----Original Message-----
> > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel-
> > ow...@vger.kernel.org] On Behalf Of Jan Kara
> > Sent: Wednesday, November 4, 2015 10:14 AM
> > To: ax...@kernel.dk
> > Cc: LKML <linux-kernel@vger.kernel.org>; linux-fsde...@vger.kernel.org;
> > Christoph Hellwig <h...@infradead.org>; Jan Kara <j...@suse.com>
> > Subject: [PATCH] brd: Refuse improperly aligned discard requests
> > 
> > Currently when improperly aligned discard request is submitted, we just
> > silently discard more / less data which results in filesystem corruption
> > in some cases. Refuse such misaligned requests.
> 
> I agree discarding more than requested is very bad.
> 
> If they are routed to SCSI or ATA devices, though, the discard commands
> (SCSI UNMAP or ATA DATA SET MANAGEMENT/TRIM) are just hints, so there 
> is no guarantee the discard will do anything.  Are you finding 
> filesystems that still don't understand that?   dm-raid held that
> mistaken assumption for a long time.

So there is blkdev_issue_zeroout() which uses blkdev_issue_discard() if
'discard_zeroes_data' is set. I'd hope that in that case zeroing really
happens as submitted or error is returned... Filesystems definitely depend
on blkdev_issue_zeroout() doing what it is told.

                                                                Honza
-- 
Jan Kara <j...@suse.com>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to