Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4207136imm; Fri, 18 May 2018 00:51:52 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqYHYKRJXs8xntpYldVVk0Rpp3R5i7SUl/nN+ZmYk7gRuiVnDWUar5kTH2JwxVXw+VtLgLO X-Received: by 2002:a17:902:24a5:: with SMTP id w34-v6mr8409346pla.52.1526629912664; Fri, 18 May 2018 00:51:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526629912; cv=none; d=google.com; s=arc-20160816; b=dPTMKawqItFUDDt+L48kWXuAx5iScyTyQyPLE2bZOR9wjeSYM6tpcNV62Iqloq6QK9 4VskCL7M6uq2rV9rykVxvi/cMVZac4P3zD9Bx1KrvyIRMBE7/h7j5C44iAtegXo8CPUu GGnizIB0ga+fQEfvpMnKgs102pyQoEhfpVDjaGrqSYeik6tknjeNIO89BvZvTY//0wFk wRtCQXyzi9mRCCxJr5SQNCYgOXZTZS7MnLISftVmO3dMh+9qfUSatiU22i5XSHioTGA6 l+u6dvjbXdEwsiiW12Q45v0mKWXWm8TsW72cWpiepbuO4amZkzZ16QV4DZr2NwPUJklS aymQ== 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=GZes8IxFyrqE186Hlg3y1KFHBLsO4P3Hm5FywF3yx4q0B4v+a1lXeHWro087EIQIDr iaBBWsCT0HaqOL7a7KuO7Cn3qX+B/eZ5sy5MX6MV520U+buUuGwZ3qjthx8A1cKp5RYp sInQ9tp6ebKtVWXzRivsnS42clIBiw7kGMB05FlK2r59qW687ChDdqSNUeQlu4i5smw/ msFqex5K8Pm5tQSrQ3JXjmLBiQOoxsi+MF3TSoYhY6wBarSMKiWXhMVxeWUyJVdIUSFU Hj/7+alco7zzpQbkggUAJVBAU5Ze+kIu0v8MEe+jxtNqD7cVc0FnHApQVtRwO6/86K3t QEDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=j9eZA86T; 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 f5-v6si6702053plr.247.2018.05.18.00.51.38; Fri, 18 May 2018 00:51:52 -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=j9eZA86T; 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 S1752423AbeERHvE (ORCPT + 99 others); Fri, 18 May 2018 03:51:04 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:42313 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751506AbeERHuZ (ORCPT ); Fri, 18 May 2018 03:50:25 -0400 Received: by mail-qt0-f194.google.com with SMTP id c2-v6so9162800qtn.9; Fri, 18 May 2018 00:50:25 -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=j9eZA86TlNncshVcGnHDewlz4p0X7kMg9q/HeDmTcsIdhhQc5y1Xr3pEymwt/+iEQm J3RW/KgV4eqdus33bpiKBaKIjEv6onOvo87NFqglmWhTg1ILVpcgZyOosRwrZ6/PlO6u W5DiUdvYBsZYfbooigUczqm3fb/G92ASTrvjLgVLPIlwpUv8LIo/frwWI3IYPPlDh7xv 3gcP5cuvpl9gV+12OhIBXwDuIme9EL9HIKZfJqNsBCVlQM2ezwQbOfzq4K3fjxRgAH8C v1YimRkfTo6X4LMKzwIUbYn9QMWBYhw/Rs/EEqi+BV6rC0zveUuuTSJF9lSlC48rube1 vHbA== 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=MexLSXbT3t0nUQLOwFjhkTpE3kKm/NVtiYZE6qSV8+EablgFlOm8VOn401neOOU3Uk lgQDfjd+XRV/N5RAXmI6xmL6mKdyWegzuNBLLYomCNVcle22B/kd7Aa8L6x0J9rSEw2r HKknmsr2zB/LHekXRCABHjLs+ndQy/eeEDvR7X23pldgxBTwdS6cvoxpK7DDZceO1ULK D1aVfZKSHHjooCb9oj7OwdTBDncLZe5AyVzzrxaS/oE4E21rdMqgblOxYmDnq/+86eUW LmHmrPKsmZDVtV64puyQjOueer7rKu40tWBxX9Hg62MDTeykb03UR+sPSnfj8dEBtQdx 63Pg== X-Gm-Message-State: ALKqPweYsZjTwn3qW/oRVvSArOH74NXHL7TIdD8lPMWNygsNkEUdhR+I LnSPI8PyhA0qLgxSvcK/daRrClv61w== X-Received: by 2002:a0c:bc85:: with SMTP id l5-v6mr8065388qvg.242.1526629824582; Fri, 18 May 2018 00:50:24 -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 s64-v6sm5443004qkl.85.2018.05.18.00.50.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 May 2018 00:50:23 -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: Fri, 18 May 2018 03:49:17 -0400 Message-Id: <20180518074918.13816-20-kent.overstreet@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180518074918.13816-1-kent.overstreet@gmail.com> References: <20180518074918.13816-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