From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.220 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794300129; b=4JfAhuyIXZnBvAHtgOodltK+HB0N+LQq60t+M1IfIIwVaoIOEi2mC4/hF/zKwFhl5b6B 8Ew0oQJegyhZj3sc8D8Myxze/oF8320g7SF6fnn/U1PexL6ok0ZWR5iyd/kfv9vEtQq9u nM0wnBZdzpcddE3xNEMxvMUYF9vtvnYIU64yFO5INFUFiQjkTwRTnmJ/JTScEuIhD7pTy PGsXbriSzjS6nB3pt8/J+om0nfykzPWhdGNzCNYHzICi9faK9eOSnMQIdZ0L2VLFWjv6q 46/QeLsNVBj6tamaagkEerD2XhxK269AdWMFYdF2wRIWfoU1Zast4M06vUUC+XYd6JA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794300129; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=i4brgHD7VQEv4fdV28u/B9VtbZT4Ktb9wxX1zeKCj/Q=; b=RSYH2ZI0yCdUInV9YKOSnVU1fvNMOahudSdJc9tmA34BqhvAjFotsXimC9bolm4Jadlk BKrwKyIpiYGHwo3Ll0e+the6lwTtSCAnTMBnLmCETTJiOd9yZHKQZIwIyDwMPExORq6uW wb9SQzFUIuGx9uNbQBMDOnm62Pcdv1pFC9h5raTJZXV1QfYOu+HYaQmbir9DuTrsyOZJB DK06PA1ow9l41Q5IwQG2DkAefk0RNWfdZ4clsDJkY2SHmN3/p+fyJ0JLXSF8oG3OmPbLI om+YOZ7CRgftkjfi6S9HSWYn8wzgCraENKInsZDTTRZMCw4xd4/Z9FOcGgztNymHPhg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=N3tgEyP7; arc=none smtp.remote-ip=91.218.175.220 Received: from mta0.migadu.com (out-220.mta0.migadu.com [91.218.175.220]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECEE8606A332 for ; Tue, 10 Nov 2026 08:42:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org ECEE8606A332 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=N3tgEyP7 X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=MpAEUXW15AK0vZ7aMmJr1Fk1OrZcbJXYROoJ2MHayrg=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1794300126; v=1; x=1794904926; b=N3tgEyP7RxctFPQmoRdYR2r4Te36Wz0U9e2Jct14oyePSp0EbUx9bDvtkzxhbSetWpo1+OP7 cJy6r2e9T2feyomyfktBlQnPxtQ7baonVCFJ6E39tmLyotgwDwFe1fOP/kNujdeNvZ5mTGUBeoD BbxFRpmWO7pzAoD9byh2vOJI= X-Envelope-To: linux-kernel@vger.kernel.org Received: by mta11.migadu.com with ESMTPS id 6fd72c2406077e29; Tue, 10 Nov 2026 08:42:06 +0000 X-Mizu-Trace-ID: 6fd72c2406077e29 X-Migadu-Flow: FLOW_OUT Message-ID: Date: Tue, 10 Nov 2026 08:42:05 +0000 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] iomap: remove the atomic write length check in iomap_dio_bio_iter_one() To: Tal Zussman , Jens Axboe , Christian Brauner Cc: Christoph Hellwig , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org References: <20261107-blkdev-atomic-bounce-v1-0-f66344262096@columbia.edu> <20261107-blkdev-atomic-bounce-v1-2-f66344262096@columbia.edu> <3fc46788-d86d-44c5-8606-385d96fede4d@linux.dev> <4022d4f9-5e2e-45d1-b9b8-208c80f82ecf@linux.dev> <21793564-61f4-4d57-b375-1271ad9bc70c@columbia.edu> Content-Language: en-US From: John Garry In-Reply-To: <21793564-61f4-4d57-b375-1271ad9bc70c@columbia.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/9/26 22:46, Tal Zussman wrote: >>> What specifically would you want to see tested? I can do an atomic write with >>> a partially unmapped buffer, with and without stable writes, and check that it >>> fails and that nothing is written. >> Just something similar to the blktests case which you added. >> > Sounds good, I'll add it to the queue. Thanks > >> BTW, have you tested this partially-unmapped case for CoW-based atomics >> on xfs? You can just do that by setting atomic_wr=0 >> > Yeah, I just tested it. It behaves as expected: returns -EFAULT with the file > unchanged, both with and without bouncing. > > The single-bio check depends on REQ_ATOMIC, which only the HW atomic path sets, > so it doesn't apply to CoW writes, both before and after this series. > > In terms of consistency, the unmapped buffer returns -EINVAL on the non-bounce > HW path (from bio_iov_iter_get_pages()) but -EFAULT for all other paths. That > should probably be made consistent across HW and SW and bounce vs. non-bounce, > but that's a separate change. Yeah, we should fail for the same reason on HW- and CoW-based atomics. I would like if any such rules could be documented and we ensure that both HW- and CoW-based atomics always fail for non-adherence to the rules. cheers