From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9EA0D1DDA1B for ; Mon, 28 Oct 2024 14:40:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.24 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730126451; cv=none; b=IdLuyhENx3RfjNSH/ASQrR+I64v8oIIBmjfIGKm0g7pEjmJbsRE4jbd8DfCdqkkrHJvRONBvTzQSI1KKUEhliyqrGKpSmaz7s/VjeaLPc2zkxSXjImQVwdH40Qf4J0erHj2O160xdENTZCkkIp2TpHweHJYXndn9j+0NsUupGck= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730126451; c=relaxed/simple; bh=+W9H+/a1AR3pvwSexpegNolrKbZESTD8KY620mmaRgE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To: Content-Type:References; b=T3NFjTRDkJzNUrbc+7mwEbxaZxiNa/58zfXw2P/fjCihWYT/uhBCleRMnMdfMGekZPGUNcCxhlCTTdAO1DfjhadZGpDpfiMKh3EicyKoN6H8cqM4MBDZuL1tY9s1bYzgrNvuOT2eWFvcuI57hsb7o0V69HkIApTtez1CjLZGB/s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=BgBK/j43; arc=none smtp.client-ip=203.254.224.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="BgBK/j43" Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20241028144046epoutp013be53f73633a72c0dc28caa10ef8c952~CpNYtTo6t2460924609epoutp01B for ; Mon, 28 Oct 2024 14:40:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20241028144046epoutp013be53f73633a72c0dc28caa10ef8c952~CpNYtTo6t2460924609epoutp01B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1730126446; bh=T55b8XTY+UM6hmZKkI27A+z3EC7/CEwwqFInuUnPr7g=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=BgBK/j43WVhlvhPip0OnT4RkQjVCmcwcoNZ7zNb7USBMAJCkdR68ON1EfY4C19WPd vo9DI0ZoYwavxvrjVxVlR4garnqXwCnUf9otlSOPUBX0o0AmSX9yvLLWaYe5Tac9Mt T8/jvt8EoVFC/o+BjTQgz9b4iqJiaPFTiV9HF4S4= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20241028144045epcas5p21d6bfc8a173149d569dea73fe637acf7~CpNYD9X-h1603716037epcas5p2z; Mon, 28 Oct 2024 14:40:45 +0000 (GMT) Received: from epsmges5p3new.samsung.com (unknown [182.195.38.174]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4XcbfN21Kjz4x9Pp; Mon, 28 Oct 2024 14:40:44 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id D2.5A.09800.C62AF176; Mon, 28 Oct 2024 23:40:44 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p1.samsung.com (KnoxPortal) with ESMTPA id 20241028144043epcas5p1a1867fb53cbfc69dd78c95c2a3bbcd30~CpNWIiyY63010430104epcas5p1n; Mon, 28 Oct 2024 14:40:43 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20241028144043epsmtrp2080041b470ffdd7a33e3b7651fb8f653~CpNWH4Z8q1117611176epsmtrp2N; Mon, 28 Oct 2024 14:40:43 +0000 (GMT) X-AuditID: b6c32a4b-4a7fa70000002648-49-671fa26c60f3 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 8B.F6.08229.B62AF176; Mon, 28 Oct 2024 23:40:43 +0900 (KST) Received: from [107.122.11.51] (unknown [107.122.11.51]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20241028144042epsmtip29836bee4c94a08085db9de127166f9e2~CpNUoiBwO1063710637epsmtip2W; Mon, 28 Oct 2024 14:40:42 +0000 (GMT) Message-ID: <45c046df-e940-47d0-bb29-f3aaeb28b458@samsung.com> Date: Mon, 28 Oct 2024 20:10:02 +0530 Precedence: bulk X-Mailing-List: io-uring@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCHv9 3/7] block: allow ability to limit partition write hints To: Keith Busch , linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, io-uring@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, hch@lst.de, javier.gonz@samsung.com, bvanassche@acm.org, Keith Busch Content-Language: en-US From: Kanchan Joshi In-Reply-To: <20241025213645.3464331-4-kbusch@meta.com> Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrHJsWRmVeSWpSXmKPExsWy7bCmlm7OIvl0g32fuC2mffjJbLFy9VEm i3et51gsHt/5zG4x6dA1RoszVxeyWOy9pW2xZ+9JFov5y56yW3Rf38HmwOVx+Yq3x6ZVnWwe m5fUe+y+2cDmce5ihUffllWM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MailID: 20241028144043epcas5p1a1867fb53cbfc69dd78c95c2a3bbcd30 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20241025213717epcas5p2d70619c312135cd1bb67dc78ca7d7b2b References: <20241025213645.3464331-1-kbusch@meta.com> <20241025213645.3464331-4-kbusch@meta.com> On 10/26/2024 3:06 AM, Keith Busch wrote: > +static ssize_t part_write_hint_mask_store(struct device *dev, > + struct device_attribute *attr, > + const char *buf, size_t count) > +{ > + struct block_device *bdev = dev_to_bdev(dev); > + unsigned short max_write_hints = bdev_max_write_hints(bdev); > + unsigned long *new_mask; > + int size; > + > + if (!max_write_hints) > + return count; > + > + size = BITS_TO_LONGS(max_write_hints) * sizeof(long); > + new_mask = kzalloc(size, GFP_KERNEL); > + if (!new_mask) > + return -ENOMEM; > + > + bitmap_parse(buf, count, new_mask, max_write_hints); > + bitmap_copy(bdev->write_hint_mask, new_mask, max_write_hints); kfree(new_mask) here.