From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.176 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796567816; b=WwWQVQXQefDRz8j1nHZM3jGWxQ8eCjwHosrUVk3GrqYRt6ISpegeI9bugPGTJdfnB2mU SDGHYU/ApN0pofWdtvwr73NMHqK1HEkp+gtfvyyWTGVDvFvx84xF8uIGgIHw94ZGbcATY NktMCGiOe30gZcFlg0o+PkmBo942zh+M4drPWhbRxRiGL9a7GJ7SmRkOZnAfy1uqWYMNV uvsHf0IrOyWqq1qyKGt8EzjnnjLLYrHW19orJk5g7q071fxXVK5DLi2t+xUL+tUL3vGkk Kj0VeWAtOgtmIG2wHMI0Nj8jeTE/VKUtZ0sK+JQRUfrReV4AvPbr01gOhfe8WiCHloQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796567816; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: MIME-Version:Content-Type:Content-Transfer-Encoding:Subject:From:To: Cc:In-Reply-To:References:Date:Message-Id:X-Mailer; bh=tPMGISrbtMVvFQeWjdfi/ftEXWgpn6wCQldw+9mf02k=; b=Eq0Pfzer1qs1zPvrhD22zoELlvRW7bzPpTuE7Hqps0rgppeV0e9kPSEO9/RQa50xXAci JSQ7jksali8fG2sP9XcQNuItKkjrSD1qhtadrEDEFCL2Uf1wik0KA2C0etCD/XVuHgHSQ n3eEcXfSPPeWjDpmWkmX2MX4fj5dnk9qAMdHcTOumXLnneyDFclqD1NnrA7ssecdnVOlM Z+pKvx6mbbFJUqmEoVuLMYFLTvIr4Dk9yvWSEYEYiV0iBaG8zma8ImDMSfn0Nl/os+Mvj Q+vMYAvSQ7Sjh5vF3fObjz7FpMZTBrigDUM4IRu6QbgH2qi+flmUke7qt03Ajj0apAw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=vjJfhTow; arc=none smtp.remote-ip=74.125.82.176 Received: from mail-dy1-f176.google.com (mail-dy1-f176.google.com [74.125.82.176]) (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 4F9E7606A31F for ; Sun, 6 Dec 2026 14:36:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4F9E7606A31F 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.a=rsa-sha256 header.s=20260707 header.b=vjJfhTow Received: by mail-dy1-f176.google.com with SMTP id 5a478bee46e88-3866a784546so3461812eec.0 for ; Sun, 06 Dec 2026 06:36:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796567815; x=1797172615; darn=vger.kernel.org; h=message-id:date:references:in-reply-to:cc:to:from:subject :content-transfer-encoding:content-type:mime-version:from:to:cc :subject:date:message-id:reply-to:content-type; bh=tPMGISrbtMVvFQeWjdfi/ftEXWgpn6wCQldw+9mf02k=; b=vjJfhTowOZQXE/U7OeKbkObfbItWn1IqV1vHDmgLgAqY7D3nebItTjP3lPmRvVcfmP eL2LzZi+P2tBC5IXhooPis1PfqVGWmeikk3H2KLbPlmNZ7tayjHIyk3EvoFxReMztsAn edXN+LraEADOSXnv3B4ROHDH+vsuJCaR7eg+JPN37wCnLyM/uUGGvSKnn06GRkHnZz7I v4GCg2GYAJQ5AK9J7gQTQQirjlb/bVLbmpsibVSS5cB7sFC+3sTQ9Qus2WKjA9NGPa80 ZaSRBiHNQwqUacyMxs1JW9jpD5iXF781r3nDj7e2+fqTLmzbPqveqb4riZz2WqEqvKEo Xz6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796567815; x=1797172615; h=message-id:date:references:in-reply-to:cc:to:from:subject :content-transfer-encoding:content-type:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=tPMGISrbtMVvFQeWjdfi/ftEXWgpn6wCQldw+9mf02k=; b=iSpjQ3B278PxDBHWdtsfOXef/GPnKUgFEDTbLnGj2w6Y7kwygreDqBNfxhUlouKWpB Ah0nZCzkF/Jp9lKVNa56xjq+JnTIWMFPy4+Drah3PuiKFi0175rYh2hipHilKNdhIhNL BXKTKLi7hXnKJZ4iNQaMfMt1iCmoHet2CxEK3Z/Yt61Zg2nb3HDLITZPJNiak0MX3jaA 9OXXNX0fMkOaHXA50kK7e7RtuzSW3sXIt0rHlt7NiDj/05AQw8Ko3Ll4uJLJ9ckyl0qR ex1Qijau7k2uCTvC2xpmHJqo0+UDB+ndMNScu6OJ4iQganV8szp5f7pidpp+ZD4Q4Qol TqoA== X-Forwarded-Encrypted: i=1; AL+hErFRYn7KNnIg/lAUrblyU3SA9IfrLCMWAI8qaYSbiprgNQIYdq5RtFKOhhqobihGO1nf5JPZ8hQ3oEJMKSo=@vger.kernel.org X-Gm-Message-State: AB4q+uEW8Rf5joxrisJI54wqfXV0x19D5h4wLl09qbgzhHCVcAsG2xy9 10ByMd5bLFqVsiZ4aWzq2aDfmURR6R5Tw4Jnf3oxzbJLDDiCQiUQi1JW X-Gm-Gg: AZFdTZew4351KFz1Z5N7c1fmE3LIUY+/ZaFX7fyW91GGSX/bwj7rdCNK+VEVtmJHxjD yy+lvCDvsjqCeVtnVrlF7rpwR8/PKgNZpwsF1KhBZmWDfx+v+tiq0D5vSDaeK85/HfJbvrHDJ/s x/Q52fd3VuMuA9MkpfpjZfz6WZ/qkCMEIP0jzEvTSEYbWl9fpOh8zh6gf4x634gV00FhrXGkiOv ROU66kFv1QwcfLtSniB7jcCP5WV2WUd2OwMTFLHqk+MM0FhDng6od4HHYoU5FA+kYZnbKCGg8ig SIjgS6bLaB2OGNAiWJ6fLS/yVMC3rskFxjFPwSEsXEoM8x6ceq/fn5dvKvnJRZhAfus4kq/lzPv mt5LVx1uNcHU9Ksq9BIT/cwrVg8GTwfwU+lBOkq+agE9TXrBXRhVC9+GmFdtjq81h2lzriZaoHh DunMjIiaAfsrMJxKFedfAR0/b6UijY1TRL73JKnmuEkkg2/exTyj9oq/ougGYilaVHPNT6TuTaA u9D4u2dvRKOQiiQNmwEOH+QeJXAjviUEmQccXonbXAdhxn4VYxm1c6RhsJAh1ceH8aRGwO9C7Dy mUYK1F7L50TSIsCOIZwsitzcYynrw/ZSgehd5Q== X-Received: by 2002:a05:7301:9f06:b0:387:3dd4:e79 with SMTP id 5a478bee46e88-3875212fef3mr11027139eec.26.1796567815336; Sun, 06 Dec 2026 06:36:55 -0800 (PST) Received: from [192.168.29.85] ([2405:201:8026:213e:3c74:4008:6758:116b]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-387521e5e7dsm34731970eec.19.2026.12.06.06.36.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Dec 2026 06:36:54 -0800 (PST) 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] char: xillybus: use stream_open for stream semantics From: mdshahid03@gmail.com To: mdshahid03@gmail.com Cc: Eli Billauer , arnd@arndb.de, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org In-Reply-To: <179433267498.153154.14194819686748523311.b4-reply@b4> References: <20261031083610.87160-1-mdshahid03@gmail.com> <24af6daf-dbf3-5c47-beb7-077c4473ea7e@outbound.gmail.com> <179433267498.153154.14194819686748523311.b4-reply@b4> Date: Sun, 06 Dec 2026 20:06:30 +0530 Message-Id: <179656779006.234358.14956830809236836492.b4-reply@b4> X-Mailer: b4 0.16.0 Hi Eli, Hope you are doing well. I also have a similar patch in the USB subsystem, which has been picked up by Greg KH: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?h=usb-next&id=8e4f387616d40f0bde7b9c80e76fcc536f02a240 Do you think also this patch is suitable for merging as well? Thanks Shahid. On 2026-11-10 23:14 +0530, mdshahid03@gmail.com wrote: > Hi Eli, > > Thanks for the detailed explanation and testing in HW. > > I think, if this doesn not break anything and using stream_open() > for these channels more logical ,then ,it make sense to use it. > > Thanks > Shahid. > > On 2026-11-02 12:23 +0100, Eli Billauer wrote: > > Hello Mohammad, > > > > On 31/10/2026 9:36, mdshahid03@gmail.com wrote: > > > Use stream_open() to mark these channels as streams and > > > disable unnecessary file position handling, > > > > The difference between stream_open() and nonseekable_open() is that the > > former sets FMODE_STREAM and clears FMODE_ATOMIC_POS. I made a quick > > test run, and FMODE_ATOMIC_POS isn't set in either case. As > > FMODE_ATOMIC_POS is clear, no lock is taken while updating fpos either way. > > > > So in effect, the only difference is that FMODE_STREAM is set. Frankly > > speaking, I'm not sure in what way this matters, if at all. > > > > > allowing read > > > and write operations to run concurrently. > > > > I checked that with hardware. There's no problem running read() and > > write() concurrently even before this patch. And I don't see why there > > would be a problem. > > > > It seems like FMODE_STREAM was supposed to replace FMODE_ATOMIC_POS > > somewhere back in 2019 with Linus' commit 0be0ee71816b ("vfs: properly > > and reliably lock f_pos in fdget_pos()"). That is where he urged the > > move towards stream_open(). But then he reverted it with commit > > 2be7d348fe92 soon afterwards. > > > > All in all, I don't know what to say about this. Calling stream_open() > > does sound more correct, and nothing broke with this patch. But I'm > > generally unhappy fiddling with code unless it fixes something. > > > > Regards, > > Eli > > > > > > > >