From nobody Tue Apr 7 08:52:52 2026 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 496913750BD for ; Sun, 15 Mar 2026 17:17:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773595024; cv=none; b=tZLrqoNrDl28EKvqub7E1J5sWU/dzX3i025JAxE3DdxT4XGC5LO22XsP23qyyrDF+ofXALgPUp6aTNUNlxDxCCktgMbyxykw2onOME9DWiPjAN+r9wy3NH6C7VHyrsbOubPRp7us5K9gcslsCNaWRu56Ab+rXHtKTUEHU9WH3QI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773595024; c=relaxed/simple; bh=iKpFG0Av0hoqoOlPYCyOzyzjoAeTHTDVQHbGXDPimao=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Mk2ffY6TQycVg7BC3KjQxzckFPhaZpGR8KnqsjHwRlcK11E1U4qeKgW74LAY6aScjkK69+pJ5/Ll0YYgxfg0oUzwKE+nETivXhx2FNGPgvkLaNURJn1gbIun3Byx7zhifaNc1olFK8jcLHhg6wTrVgHeiChRr+ZiHfWUnZ5qJ0U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ArBu8oJU; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ArBu8oJU" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-43b3d9d0695so557341f8f.0 for ; Sun, 15 Mar 2026 10:17:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773595021; x=1774199821; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QBcY1jNO230ersIPOAT9WM1qbuR7iZiog4/B3vVvee0=; b=ArBu8oJUDEqbx6ubRa5lF3ZLeuJit//fOBLBhSwho5ZlzK2T+NoiV56GqNLs/wDk1X wFwOMS+HMJ9wTUcao8Fjdk3ArwEt0qNXw3vgDUT5u4AbV32v9mVJeCqKJrgfpJl85B+F myvJeqvd3DLVoWCTfoHq+eWvzmiZKdBx7YZ+6TIyaTcETv9t01yqqJ4RWq1SRvWa+pin b47SLEr0dtVMZCM/kE8jAZie43cFU2cI110Sv2Xj2c1wk3zB8PbwYGDe/1XF/SVjkcEu 2/CvSRjSM87n4952zIBSFwIeVusVrUKFp+zpM4W8d2kBBwHw8PVnbn5F07glXX1pUV8T Eh0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773595021; x=1774199821; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QBcY1jNO230ersIPOAT9WM1qbuR7iZiog4/B3vVvee0=; b=eA84N2O/ZtfecSghcTtylBdMhnW4LHSyqmEiw3mx+TCN9OEfiZRhE5mF0lRuD6iFkP GjAWw/IjsyFp/+cOoz2XKwLCa7zMxm+iYz2O8VL6viCKQddn+OR3fd8VYJnrebDEAo4U qPWiCxYXxHLSHma/S4LDiPfQBIszi/CGxgGg1+C9YXdBz6Y53kAaM1y54lRuVSM3gEUB 1ojLWLeijl0OiVZqZ8bhcxDrt3FKxGM5JE6ErNovV5q4MH/ufiw2r62r+khIYv0ofExn 5xERhbevztQFExTwGBn2m70OUyyGz308/uo8KW4Ge6j3tWxEsdlyZgRqtrYeugOgFPRa 99Dg== X-Forwarded-Encrypted: i=1; AJvYcCUf2LMLvk/x/QkaPtcosSqOBgKIsQcQPCtQCmjyqc+Y2PeoSamGio5Rh51QYe+30UjRHP/1U4X4+xnawqA=@vger.kernel.org X-Gm-Message-State: AOJu0YxdhnRJRGZ42qrS7BherlOkacTNVoemL89sLI4mq6UmLBbCn00n gIds5uuVvrnAtL1BqUqsiUQ3Evo/ao2HhJcYKV9OyPQpJW8F/Z4PkqJX0FT7VCJG4f9m5g== X-Gm-Gg: ATEYQzzd+vLoFhUXzZwOmjBxQCs8rkAWT1qrLlvfxwTNQ6IH6GPKfyEHhLsr6TmXPCz y4uMLt6YiqXkIfT90ngisiM90HG7bcKrk00PUvPHefDl+05oIIxD6MCkv2e2CytNJym9erpIijf qffpNu1hetDGGUGgiLBkKLBxVkfNLDTHatlnIkvsRMjH6lOCyeH4rAZdqMWt1saMQxBbRLUci/C a4vQGAnVoZhxpRc0YUx66pmI/TfQB2vr4lphge31G05CggHlIv2gclff7+hszi7Q0Ak9KQ1Dnja Y69MA4XbkPRzVVki4eFb4jxl/TuqVGoWIjGWGFONknwWsteQ1hoqmsI40SB21hs9Ijm8anm1Oky J74c6KyE+hOcUixTKdSSrd/lk9uNDQUO7qeeYzLYpAnyzTPefUeRzdQ1zjZWC4u4RJdrecGRcIF A/8/ax6E0VFcx7XugcNi28ROrCd194aS5yPw== X-Received: by 2002:a05:6000:40ce:b0:439:d74d:a686 with SMTP id ffacd0b85a97d-439fe1ae6b7mr26631100f8f.28.1773595020567; Sun, 15 Mar 2026 10:17:00 -0700 (PDT) Received: from debian.lan ([171.22.84.130]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439fe21b631sm40536429f8f.27.2026.03.15.10.16.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Mar 2026 10:17:00 -0700 (PDT) From: Adrian Garcia Cicuelo X-Google-Original-From: Adrian Garcia Cicuelo To: Ulf Hansson , Adrian Hunter , Andreas Hindborg , Jens Axboe , Miri Korenblit Cc: Miguel Ojeda , Haibo Chen , Frank Li , Sascha Hauer , Boqun Feng , linux-mmc@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-block@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Adrian Garcia Cicuelo Subject: [PATCH v2 2/3] rust: block: rnull: update to Pin> for PinInit Date: Sun, 15 Mar 2026 18:16:51 +0100 Message-ID: <20260315171652.269020-3-adriangarciacicuelo@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260315171652.269020-1-adriangarciacicuelo@gmail.com> References: <20260315171652.269020-1-adriangarciacicuelo@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Update the Rust rnull driver to use Pin> for queue data allocation. This aligns the driver with the latest PinInit zero-copy initialization abstractions in kernel 7.0 and fixes a type mismatch with GenDiskBuilder::build(). Signed-off-by: Adrian Garcia Cicuelo --- drivers/block/rnull/rnull.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/block/rnull/rnull.rs b/drivers/block/rnull/rnull.rs index 0ca8715fe..23df23936 100644 --- a/drivers/block/rnull/rnull.rs +++ b/drivers/block/rnull/rnull.rs @@ -54,7 +54,7 @@ fn new( ) -> Result> { let tagset =3D Arc::pin_init(TagSet::new(1, 256, 1), GFP_KERNEL)?; =20 - let queue_data =3D Box::new(QueueData { irq_mode }, GFP_KERNEL)?; + let queue_data =3D Box::pin_init(QueueData { irq_mode }, GFP_KERNE= L)?; =20 gen_disk::GenDiskBuilder::new() .capacity_sectors(capacity_mib << (20 - block::SECTOR_SHIFT)) @@ -65,16 +65,21 @@ fn new( } } =20 +#[pin_data] struct QueueData { irq_mode: IRQMode, } =20 #[vtable] impl Operations for NullBlkDevice { - type QueueData =3D KBox; + type QueueData =3D Pin>; =20 #[inline(always)] - fn queue_rq(queue_data: &QueueData, rq: ARef>, _is_l= ast: bool) -> Result { + fn queue_rq( + queue_data: Pin<&QueueData>, + rq: ARef>, + _is_last: bool, + ) -> Result { match queue_data.irq_mode { IRQMode::None =3D> mq::Request::end_ok(rq) .map_err(|_e| kernel::error::code::EIO) @@ -87,7 +92,7 @@ fn queue_rq(queue_data: &QueueData, rq: ARef>, _is_last: bool) Ok(()) } =20 - fn commit_rqs(_queue_data: &QueueData) {} + fn commit_rqs(_queue_data: Pin<&QueueData>) {} =20 fn complete(rq: ARef>) { mq::Request::end_ok(rq) --=20 2.47.3