From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 D303C3909AA for ; Mon, 16 Mar 2026 10:56:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773658585; cv=none; b=lurFRwwLBkCzihU0sRBtY4TIYzOIIETU0Nt9nfCwmS8svwZY3abiJ6NcxHBaCZJpY8W8z/EwiWZx3azVoQWMVEzixZOA7rq/yKvO/ojilKkxOcloPjE0QeGFbHrSAhbwyFdPIJ+2/AHf0C4E+QcQmdwmYcTkDg8N7Z2oDM2OHcw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773658585; c=relaxed/simple; bh=UsrG64AdOhup+wZBugoJxKc7YGItuood9RNG/AVe/pE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=r4cVKP3s4hQ3G6XMPITPSWa0dFNT5S6nZYbelXiK8E54nUk8nj/dd86z8szOf/wc7nZ2/r6EsmjbV+wuvOtqtgtJhiTRJCwnNnceUtmjDD+10+MF5U2U5Z2TjJBlzouJSolCsfNKW7d7YSSbrgl/yHgufA31qhS0FW82mjGK1sA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Et7Fx+F/; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Et7Fx+F/" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-48532df52c5so64396715e9.1 for ; Mon, 16 Mar 2026 03:56:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1773658581; x=1774263381; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=/z1SiqPCUjiS0l1gYfp55UVRcWnc3c5gpJsp5+gG+GQ=; b=Et7Fx+F/K0livNgzpWkxm0lDeD3B0CP9OCpBTPmi4vlih/NCJD06O2mZe3+jKqJpT+ QMiz9z7+7JYrfjXxAofK1n7KgXDlORGSrKR7WlebrahTOsmVx21jMmmiaWr25YCsfAcp uFxwv828mgm1zoE+AuJo5YkO18czJzpy7WIRptUnDFFXbGVuXem81QzN7mgBRwN9hlk0 4Q6AZ3suC20pw9X8DkFhDWk5G4XtUecwwZ2FqfwNd6TrgqhX9NISj7+7r9JQQCvxDIiK RsYAV2dKFEkSoRBUDwI2pxD7aYO70yfLlOAZk6KU6bRRn2+czsTX0eGzb+oRTMICFWqe t/WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773658581; x=1774263381; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/z1SiqPCUjiS0l1gYfp55UVRcWnc3c5gpJsp5+gG+GQ=; b=X7eRwRGfTaYA1/raWvS3YhwGtCBE7UC3j5QkPLtl1/TKnl3tP61zJaHOJB58Rcojmp aWDlbNPuCLOPIorWPdJ3/ob/mYrt8ByluttEusYaxN/mlLDTzEfE7gY6vaq5zz56A7U+ q5/O3VAjwbylYmMunRTZBE5dTaqXS6UGV5hPCROXjHggNDrv5o2b1Z1k7JCYtFAdR52m p+rBF+C2ZXm2RmEx0194HKwxwkEY2eAUD/tyY6GEBaAy4HG9I7JD4hxRJ/IR5r9DbNFe pn42g581AEeyzG1oxISs8L5gyFyEu9REiFkWTyFZe7ivPZZPtsBc43jdfVTQM6uqVwQ1 RHdA== X-Forwarded-Encrypted: i=1; AJvYcCWxolAtdVF2Q3ErdMliUWC6vzGuaa+rR6oAQLeyajQmOf2Fth8fx4EBkHt9XKERAKT5sZFWR8+Xr8BGIjs=@vger.kernel.org X-Gm-Message-State: AOJu0YwGY2JljRff2GlsbkKsYvsBbPQi5bHn79TTz9O5632L8aBliRQ6 ju7AUYl566uTb0gZ9APdSh37UtAd9CKL5mKCL2hpMLA8SBY84WODLK6cCyUj1kG30wiel6QzwRq JKWVn4Jx/DRnqAvW9+Q== X-Received: from wmbgx10.prod.google.com ([2002:a05:600c:858a:b0:483:a1ee:5eca]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:3515:b0:47e:e57d:404 with SMTP id 5b1f17b1804b1-485567066a8mr208531255e9.16.1773658581102; Mon, 16 Mar 2026 03:56:21 -0700 (PDT) Date: Mon, 16 Mar 2026 10:56:20 +0000 In-Reply-To: <20260216-rnull-v6-19-rc5-send-v1-23-de9a7af4b469@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260216-rnull-v6-19-rc5-send-v1-0-de9a7af4b469@kernel.org> <20260216-rnull-v6-19-rc5-send-v1-23-de9a7af4b469@kernel.org> Message-ID: Subject: Re: [PATCH 23/79] block: rust: change sector type from usize to u64 From: Alice Ryhl To: Andreas Hindborg Cc: Boqun Feng , Jens Axboe , Miguel Ojeda , Gary Guo , "=?utf-8?B?QmrDtnJu?= Roy Baron" , Benno Lossin , Trevor Gross , Danilo Krummrich , FUJITA Tomonori , Frederic Weisbecker , Lyude Paul , Thomas Gleixner , Anna-Maria Behnsen , John Stultz , Stephen Boyd , Lorenzo Stoakes , "Liam R. Howlett" , linux-block@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset="utf-8" On Mon, Feb 16, 2026 at 12:35:10AM +0100, Andreas Hindborg wrote: > Change the `sector()` and `sectors()` methods in `Request` to return > `u64` and `u32` respectively instead of `usize`. This matches the > underlying kernel types. > > Update rnull driver to handle the new sector types with appropriate > casting throughout the read, write, and discard operations. > > Signed-off-by: Andreas Hindborg This has lots of unchecked casts from u64 to usize, which could overflow on 32-bit systems. Could use some CAST: comments or similar. Alice