Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932895AbbKEEUI (ORCPT ); Wed, 4 Nov 2015 23:20:08 -0500 Received: from g4t3426.houston.hp.com ([15.201.208.54]:54285 "EHLO g4t3426.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932525AbbKEEUG convert rfc822-to-8bit (ORCPT ); Wed, 4 Nov 2015 23:20:06 -0500 From: "Elliott, Robert (Persistent Memory)" To: Jan Kara , "axboe@kernel.dk" CC: LKML , "linux-fsdevel@vger.kernel.org" , Christoph Hellwig Subject: RE: [PATCH] brd: Refuse improperly aligned discard requests Thread-Topic: [PATCH] brd: Refuse improperly aligned discard requests Thread-Index: AQHRFxvMH6iDNw/pC0S/11GGenGunJ6M0hGA Date: Thu, 5 Nov 2015 04:18:49 +0000 Message-ID: <94D0CD8314A33A4D9D801C0FE68B40295BE0AFAA@G4W3202.americas.hpqcorp.net> References: <1446653619-22880-1-git-send-email-jack@suse.com> In-Reply-To: <1446653619-22880-1-git-send-email-jack@suse.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [16.210.48.36] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1267 Lines: 30 > -----Original Message----- > From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel- > owner@vger.kernel.org] On Behalf Of Jan Kara > Sent: Wednesday, November 4, 2015 10:14 AM > To: axboe@kernel.dk > Cc: LKML ; linux-fsdevel@vger.kernel.org; > Christoph Hellwig ; Jan Kara > 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. --- Robert Elliott, HP Server Storage -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/