Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753438Ab2H1Vnm (ORCPT ); Tue, 28 Aug 2012 17:43:42 -0400 Received: from mail-qa0-f53.google.com ([209.85.216.53]:35004 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751939Ab2H1Vnk (ORCPT ); Tue, 28 Aug 2012 17:43:40 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 28 Aug 2012 17:43:40 -0400 Message-ID: Subject: [PATCH 1/2] add discard support to nbd From: Paul Clements To: kernel list Cc: andrew morton Content-Type: multipart/mixed; boundary=bcaec51dd7c5df97d004c85a55d0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3560 Lines: 56 --bcaec51dd7c5df97d004c85a55d0 Content-Type: text/plain; charset=ISO-8859-1 --bcaec51dd7c5df97d004c85a55d0 Content-Type: application/octet-stream; name="nbd-set-flags-ioctl.diff" Content-Disposition: attachment; filename="nbd-set-flags-ioctl.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h6fiw4eq0 RGVzY3JpcHRpb246IFRoaXMgcGF0Y2ggYWRkcyBhIHNldC1mbGFncyBpb2N0bCwgYWxsb3dpbmcg dmFyaW91cyBvcHRpb24KZmxhZ3MgdG8gYmUgc2V0IG9uIGFuIG5iZCBkZXZpY2UuCgpTaWduZWQt b2ZmLWJ5OiBQYXVsIENsZW1lbnRzIDxwYXVsLmNsZW1lbnRzQHN0ZWVsZXllLmNvbT4KLS0tCmRp ZmYgLS1naXQgYS9kcml2ZXJzL2Jsb2NrL25iZC5jIGIvZHJpdmVycy9ibG9jay9uYmQuYwppbmRl eCBkMDdjOWY3Li5jNTQ0YmI0IDEwMDY0NAotLS0gYS9kcml2ZXJzL2Jsb2NrL25iZC5jCisrKyBi L2RyaXZlcnMvYmxvY2svbmJkLmMKQEAgLTc4LDYgKzc4LDggQEAgc3RhdGljIG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IG5lZWQgdGhlIG5iZF9kZXZpY2Ugc3RydWN0dXJlICovCkBAIC00MiwxMCArNDcs NiBAQCBlbnVtIHsKICNpbmNsdWRlIDxsaW51eC93YWl0Lmg+CiAjaW5jbHVkZSA8bGludXgvbXV0 ZXguaD4KIAotLyogdmFsdWVzIGZvciBmbGFncyBmaWVsZCAqLwotI2RlZmluZSBOQkRfUkVBRF9P TkxZIDB4MDAwMQotI2RlZmluZSBOQkRfV1JJVEVfTk9DSEsgMHgwMDAyCi0KIHN0cnVjdCByZXF1 ZXN0OwogCiBzdHJ1Y3QgbmJkX2RldmljZSB7Cg== --bcaec51dd7c5df97d004c85a55d0-- -- 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/