Received: by 10.192.165.148 with SMTP id m20csp4959892imm; Tue, 8 May 2018 18:35:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrqthMRgI7AVq0Y1klAXghjYil6iAoGjlq003K2ASiVAIwT57kVpuR3WXtKIKj5KHHlr5Oo X-Received: by 2002:a63:6842:: with SMTP id d63-v6mr34610618pgc.304.1525829710996; Tue, 08 May 2018 18:35:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525829710; cv=none; d=google.com; s=arc-20160816; b=bA+fhztY6PQW74l+90PQv2gGnJwndUCpts/vaP+3yOjHInX64LC7LmwoR/dVpJwRHn TFszOJJZ38dA51ylAX0qa/UfCs/MrgZuWKePQwwCjud4Vmjiq6b0zHJSVTR8eVNXqEtm kq6CmO+kKHTBZKzgepBjqabJzT643TvQwheEVr/OqcxrZIGD6/RtokhlKG/WI6UzG8pj MA4ssBZnMZGTGfjcinWYAOupBxgBeuNGM0TSlSSuZIe5EZj1yYMmfhIGXO5CicnP5jdx WJ7gFcccIo5MJQMoo2k+WmLcrQJ8MOH+2GomM4Ek7lpyGb0xF7fUnEQi1YmaanuTjxTt yq/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=Rv3LX93vzi/pAAeguDBUHSRdHWKeCE08PUlCGw8LurE=; b=CcKDGOjvOxyQEH+ojmac13ATPZ2Dkeuh0u4CIb13aJfpY+f1xOTiWUvQ0xwrd2HCuI 38eFDT4/m/ofURMBSpzRmAx1zWzk8EgvaNUE0zaBz3KcOQ8nbJ6nLcRaEO9rKtxJZ2M3 KIvhCveWxKnmWG6Ab2ruTRiGylZcQaHToZtQIWBI3O8s25eeYoxyURzoT3POK30mVwKf nA2foP4YjmiRBAVxIVXzF8RgUM7FkyFmnrpgoR2IUV1ddXtDMhp5gvLd//sN9jaXWMwp zeiaxJcX+LKi57kbTuYiY9Cuj2nu1hpnTMGc2f8+7/ZsONrZ8qiqYhJaQr1K5rXw5z2T m8Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ow462KOc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o9si25509307pfk.276.2018.05.08.18.34.55; Tue, 08 May 2018 18:35:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ow462KOc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933630AbeEIBek (ORCPT + 99 others); Tue, 8 May 2018 21:34:40 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:46509 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933576AbeEIBed (ORCPT ); Tue, 8 May 2018 21:34:33 -0400 Received: by mail-qk0-f196.google.com with SMTP id s70so26302545qks.13; Tue, 08 May 2018 18:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Rv3LX93vzi/pAAeguDBUHSRdHWKeCE08PUlCGw8LurE=; b=Ow462KOc9HRyc94JsCiOtdePPYIrwTWUc634AdAT8zhrHVRmvHJ+acNS1GTVnukqBJ 5B1mqRRGMJ8hZ8dIPijGbfc9cJvzIf56FzIUoB3FPhfDREyjz5VmoXgHOV5PTlPsGOgi US1zu5i03khz1TG0GWzwWkqgbohVPRx6aXQFdRwQ2X/Dggqy8Grne53EoZVtVBhky65J MlivxXMgTxqXe0C6dXce9TXwTVQWXslNKRUxcJh/fFGxRi7Pf7Jd+S0uADGa0L4FZmHj h0nJXxfotPtp3FKRVQO4FIoFhXSXTZDFUHhhtKxf7iS+/vf7DKKKt6xpAkaTs/ZcW3Zq s1OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Rv3LX93vzi/pAAeguDBUHSRdHWKeCE08PUlCGw8LurE=; b=meDAGy9MsJlePdO5+eiyEPpAYyAJL19WRasuuSOWBFOwE6TBOIkif19/HEk6qLazN2 l6xm/3a0imal7+8n9Z13KY93HZw9m3gjisRtLuXBXxpd/sNYrTrPYedk9r1uoA6Qm5oe zZ3dWH6thlIvdiOkRKbqwaP7twt/efrFvIdN36Cv7VxlDD/aKb95nvDw365GbAYnGX5M +TeZJ71neFHQMUHYmQzIrF+HpmypS/i1dkpRn6gBIZB+WnmdDbjpcZ9Nmy0RXpzo8EPN pJkn67D21ZvFA4bvsTXWv8dnYiNS0LywSdtyKkDL8608p5tdnKQtiW/ruIqfr7YS3ZUP z2yQ== X-Gm-Message-State: ALKqPwdL7lhJLFLGrXmxERjD2a+LozX1/97hpYhV/DqiDo5x395PjCTG dvd9eeADe+9MjhaLrKO+v5WWsHVc0A== X-Received: by 10.55.188.68 with SMTP id m65mr16019141qkf.87.1525829672286; Tue, 08 May 2018 18:34:32 -0700 (PDT) Received: from localhost.localdomain (c-71-234-172-214.hsd1.vt.comcast.net. [71.234.172.214]) by smtp.gmail.com with ESMTPSA id x28-v6sm23719003qtx.95.2018.05.08.18.34.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 May 2018 18:34:31 -0700 (PDT) From: Kent Overstreet To: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-mm@kvack.org, Jens Axboe , Ingo Molnar Cc: Kent Overstreet Subject: [PATCH 10/10] block: Add sysfs entry for fua support Date: Tue, 8 May 2018 21:33:58 -0400 Message-Id: <20180509013358.16399-11-kent.overstreet@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180509013358.16399-1-kent.overstreet@gmail.com> References: <20180509013358.16399-1-kent.overstreet@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Kent Overstreet --- block/blk-sysfs.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index cbea895a55..d6dd7d8198 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c @@ -497,6 +497,11 @@ static ssize_t queue_wc_store(struct request_queue *q, const char *page, return count; } +static ssize_t queue_fua_show(struct request_queue *q, char *page) +{ + return sprintf(page, "%u\n", test_bit(QUEUE_FLAG_FUA, &q->queue_flags)); +} + static ssize_t queue_dax_show(struct request_queue *q, char *page) { return queue_var_show(blk_queue_dax(q), page); @@ -665,6 +670,11 @@ static struct queue_sysfs_entry queue_wc_entry = { .store = queue_wc_store, }; +static struct queue_sysfs_entry queue_fua_entry = { + .attr = {.name = "fua", .mode = S_IRUGO }, + .show = queue_fua_show, +}; + static struct queue_sysfs_entry queue_dax_entry = { .attr = {.name = "dax", .mode = S_IRUGO }, .show = queue_dax_show, @@ -714,6 +724,7 @@ static struct attribute *default_attrs[] = { &queue_random_entry.attr, &queue_poll_entry.attr, &queue_wc_entry.attr, + &queue_fua_entry.attr, &queue_dax_entry.attr, &queue_wb_lat_entry.attr, &queue_poll_delay_entry.attr, -- 2.17.0