On Apr 13, 2025, at 17:59, Kent Overstreet wrote:
>
> On Sat, Apr 12, 2025 at 06:20:49PM +0800, Alan Huang wrote:
>> Reported-by: syzbot+d10151bf01574a09a...@syzkaller.appspotmail.com
>> Signed-off-by: Alan Huang
>
> This was a silly mistake.
>
> In the past I&
Reported-by: syzbot+d10151bf01574a09a...@syzkaller.appspotmail.com
Signed-off-by: Alan Huang
---
fs/bcachefs/recovery.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index d2b07f602da9..606d684e6f23 100644
--- a/fs
On Apr 12, 2025, at 14:45, syzbot
wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:29e7bf01ed80 Add linux-next specific files for 20250410
> git tree: linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=1515f74c58
> kernel config: htt
On Apr 7, 2025, at 01:51, syzbot
wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:a2392f333575 drm/panthor: Clean up FW version information ..
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
> for-kernelci
> console output: https:/
On Mar 27, 2025, at 00:17, Kent Overstreet wrote:
>
> On Wed, Mar 26, 2025 at 09:19:06PM +0530, Bharadwaj Raju wrote:
>> On Wed, Mar 26, 2025 at 8:22 PM Kent Overstreet
>> wrote:
>>> Or better, a new helper: when we're copying to a fixed size buffer we
>>> really want to zero out the rest of the
On Mar 26, 2025, at 17:44, Roxana Nicolescu
wrote:
>
> strncpy() is deprecated for NUL-terminated destination buffers. Use
> strscpy() instead.
>
> Link: https://github.com/KSPP/linux/issues/90
> Signed-off-by: Roxana Nicolescu
> ---
> fs/bcachefs/btree_trans_commit.c | 2 +-
> 1 file changed,
The smp_rmb() guarantees that reads from reservations.counter
occur before accessing cur_entry_u64s. It's paired with the
atomic64_try_cmpxchg in journal_entry_open.
Signed-off-by: Alan Huang
---
Since I'm touching this part, add the READ_ONCE anyway.
fs/bcachefs/journal.h | 6
On Mar 18, 2025, at 22:57, Kent Overstreet wrote:
>
> On Tue, Mar 18, 2025 at 10:26:03AM -0400, John Stoffel wrote:
>>>>>>> "Kent" == Kent Overstreet writes:
>>
>>> On Mon, Mar 17, 2025 at 04:58:26PM -0400, John Stoffel wrote:
>>>&
The smp_rmb() guarantees that reads from reservations.counter
occur before accessing cur_entry_u64s. It's paired with the
atomic64_try_cmpxchg in journal_entry_open.
Signed-off-by: Alan Huang
---
fs/bcachefs/journal.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
The smp_mb() is paired with nothing.
Signed-off-by: Alan Huang
---
fs/bcachefs/journal.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c
index 8d4f3bfaa228..fc15644c9f24 100644
--- a/fs/bcachefs/journal.c
+++ b/fs/bcachefs/journal.c
@@ -761,7
atomic64_read(&j->seq) - j->seq_write_started == JOURNAL_STATE_BUF_NR is
the condition in journal_entry_open where we return JOURNAL_ERR_max_open,
so journal_cur_seq(j) - seq == JOURNAL_STATE_BUF_NR means that the buf
corresponding to seq has started to write.
Signed-off-by: Alan Huan
Now there are 16 journal buffers, 8 is too small to be enough.
Signed-off-by: Alan Huang
---
fs/bcachefs/recovery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index 71c786cdb192..a6e26733854d 100644
--- a/fs/bcachefs
On Mar 7, 2025, at 01:57, syzbot
wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:99fa936e8e4f Merge tag 'affs-6.14-rc5-tag' of git://git.ke..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=11f0807858
> kernel config: h
When bset past end of btree node, we should not add sectors to
b->written, which will overflow b->written.
Reported-by: syzbot+3cb3d9e8c3f197754...@syzkaller.appspotmail.com
Tested-by: syzbot+3cb3d9e8c3f197754...@syzkaller.appspotmail.com
Signed-off-by: Alan Huang
---
fs/bcachefs/btree_io
On Mar 3, 2025, at 22:51, syzbot
wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:e056da87c780 Merge remote-tracking branch 'will/for-next/p..
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
> for-kernelci
> console output: https:/
@google.com/T/
Reported-by: syzbot+fe63f377148a6371a...@syzkaller.appspotmail.com
Tested-by: syzbot+fe63f377148a6371a...@syzkaller.appspotmail.com
Signed-off-by: Alan Huang
---
fs/bcachefs/btree_cache.c | 9 +
fs/bcachefs/btree_key_cache.c | 2 +-
fs/bcachefs/btree_locking.c | 5
@google.com/T/
Reported-by: syzbot+fe63f377148a6371a...@syzkaller.appspotmail.com
Tested-by: syzbot+fe63f377148a6371a...@syzkaller.appspotmail.com
Signed-off-by: Alan Huang
---
syzbot test:
https://lore.kernel.org/all/66f97d9a.050a0220.6bad9.001d@google.com/T
> On Feb 12, 2025, at 12:31, syzbot
> wrote:
>
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit:09fbf3d50205 Merge tag 'tomoyo-pr-20250211' of git://git.c..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=14370aa458
> k
On Feb 21, 2025, at 10:46, Dennis Zhou wrote:
>
> Hello,
>
> On Thu, Feb 20, 2025 at 03:37:26PM -0500, Kent Overstreet wrote:
>> On Thu, Feb 20, 2025 at 06:16:43PM +0100, Vlastimil Babka wrote:
>>> On 2/20/25 11:57, Alan Huang wrote:
>>>> Ping
>
> On Feb 20, 2025, at 20:40, Kent Overstreet wrote:
>
> On Thu, Feb 20, 2025 at 06:57:32PM +0800, Alan Huang wrote:
>> Ping
>
> I really want to get this fixed in percpu...
>
> let's leave this until we can fix it properly, this has come up before
> an
Ping
> On Feb 12, 2025, at 22:27, Kent Overstreet wrote:
>
> Adding pcpu people to the CC
>
> On Wed, Feb 12, 2025 at 06:06:25PM +0800, Alan Huang wrote:
>> The cycle:
>>
>> CPU0: CPU1:
>> bc->lock pcpu_alloc_mutex
>> pcpu_alloc_mutex bc-&g
The fix alone doesn't fix [1], but should be applied before debugging
that.
[1] https://syzkaller.appspot.com/bug?extid=38a0cbd267eff2d286ff
Signed-off-by: Alan Huang
---
fs/bcachefs/btree_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/bcachefs/btree_io.c
On Feb 18, 2025, at 08:50, Wei Yang wrote:
>
> This patch adjust the example code with following two purpose:
>
> * reduce the confusion on not releasing e->lock
> * emphasize e is valid and not stale with e->lock held
>
> Signed-off-by: Wei Yang
> CC
On Feb 18, 2025, at 19:40, Kairui Song wrote:
>
> On Tue, Feb 18, 2025 at 2:09 AM Alan Huang wrote:
>>
>> On Feb 18, 2025, at 01:12, Kairui Song wrote:
>>>
>>> On Mon, Feb 17, 2025 at 12:13 AM Kairui Song wrote:
>>>>
>>>>
Ignore this.
> On Feb 18, 2025, at 14:37, Alan Huang wrote:
>
> Reported-by: syzbot+38a0cbd267eff2d28...@syzkaller.appspotmail.com
> Signed-off-by: Alan Huang
> ---
> fs/bcachefs/btree_io.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git
Reported-by: syzbot+38a0cbd267eff2d28...@syzkaller.appspotmail.com
Signed-off-by: Alan Huang
---
fs/bcachefs/btree_io.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/bcachefs/btree_io.c b/fs/bcachefs/btree_io.c
index e71b278672b6..0022529522f1 100644
--- a/fs
On Feb 18, 2025, at 01:12, Kairui Song wrote:
>
> On Mon, Feb 17, 2025 at 12:13 AM Kairui Song wrote:
>>
>> On Sat, Feb 15, 2025 at 7:24 AM Andrew Morton
>> wrote:
>>>
>>> On Fri, 14 Feb 2025 10:11:19 -0800 syzbot
>>> wrote:
>>>
syzbot has found a reproducer for the following issue o
On Feb 17, 2025, at 15:41, Wei Yang wrote:
>
> On Mon, Feb 17, 2025 at 10:22:53AM +0800, Alan Huang wrote:
>> On Feb 17, 2025, at 10:12, Boqun Feng wrote:
>>>
>>> Hi Wei,
>>>
>>> The change loosk good to me, thanks!
>>>
>>> I
On Feb 17, 2025, at 10:12, Boqun Feng wrote:
>
> Hi Wei,
>
> The change loosk good to me, thanks!
>
> I queued the patch for futher reviews and tests with some changes in the
> commit log (for title formating and a bit more explanation), please see
> below.
>
> Regards,
> Boqun
>
> On Wed, Ja
_orig_restart_count is unused now, according to the logic, trans_was_restarted
should be using _orig_restart_count.
Signed-off-by: Alan Huang
---
fs/bcachefs/btree_iter.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/bcachefs/btree_iter.h b/fs/bcachefs/btree_iter.h
/0xa0
00242 el0t_64_sync_handler+0x104/0x130
00242 el0t_64_sync+0x154/0x158
00242 Code: 6b01001f 5401 79408460 3617fec0 (d421)
00242 ---[ end trace ]---
00242 Kernel panic - not syncing: Oops - BUG: Fatal exception
Signed-off-by: Alan Huang
---
fs/bcachefs/io_write.c | 33
The cycle:
CPU0: CPU1:
bc->lockpcpu_alloc_mutex
pcpu_alloc_mutexbc->lock
Reported-by: syzbot+fe63f377148a6371a...@syzkaller.appspotmail.com
Tested-by: syzbot+fe63f377148a6371a...@syzkaller.appspotmail.com
Signed-off-by: Alan Huang
---
fs/bcachefs
/0xa0
00242 el0t_64_sync_handler+0x104/0x130
00242 el0t_64_sync+0x154/0x158
00242 Code: 6b01001f 5401 79408460 3617fec0 (d421)
00242 ---[ end trace ]---
00242 Kernel panic - not syncing: Oops - BUG: Fatal exception
Signed-off-by: Alan Huang
---
fs/bcachefs/io_write.c | 12
> On Feb 12, 2025, at 12:31, syzbot
> wrote:
>
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit:09fbf3d50205 Merge tag 'tomoyo-pr-20250211' of git://git.c..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=14370aa458
> k
On Feb 11, 2025, at 00:25, Kent Overstreet wrote:
>
> On Mon, Feb 10, 2025 at 11:04:21AM +0800, Alan Huang wrote:
>> Since we don't merge compressed extents, uncompressed_size should be
>> equal to compressed_size, use uncompressed_size to clarify the intention.
>
On Feb 11, 2025, at 00:28, Kent Overstreet wrote:
>
> On Mon, Feb 10, 2025 at 11:04:22AM +0800, Alan Huang wrote:
>> acc->k.data should be used with the lock hold:
>
>
>
>>
>> Signed-off-by: Alan Huang
>
>
> Test this with lockdep (you know
opping secondary CPUs
00265 Kernel Offset: disabled
00265 CPU features: 0x000,0070,0010,8240500b
00265 Memory Limit: none
00265 ---[ end Kernel panic - not syncing: kasan.fault=panic set ... ]---
00270 = FAILED TIMEOUT generic.187 in 1200s
Signed-off-by: Alan Huang
---
fs/bc
Since we don't merge compressed extents, uncompressed_size should be
equal to compressed_size, use uncompressed_size to clarify the intention.
Signed-off-by: Alan Huang
---
fs/bcachefs/extents.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/bcachefs/extents.c
On Jan 31, 2025, at 20:47, Jeongjun Park wrote:
>
> In the previous commit b3d82c2f2761, code was added to prevent journal
> sequence
> overflow. Among them, the code added to journal_entry_open() uses the
> bch2_fs_fatal_err_on() function to handle errors.
At least, bch2_journal_halt could inv
When ancestor is less than IS_ANCESTOR_BITMAP, we would get an incorrect
result.
Signed-off-by: Alan Huang
---
fs/bcachefs/snapshot.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/bcachefs/snapshot.c b/fs/bcachefs/snapshot.c
index c54091a28909..ede0b480e7d4 100644
Hello Kent,
Here are the links to the missed patches, I’d like to know if these patches are
still needed :)
[1] https://lore.kernel.org/all/20240925164500.1178107-1-mmpgour...@gmail.com/T/
[2] https://lore.kernel.org/all/20240925164602.1179117-1-mmpgour...@gmail.com/T/
[3] https://www.mail-arc
On Nov 11, 2024, at 17:30, Nan Xiao wrote:
>
> Hi Alan and Akira,
>
> Thanks very much for your answers! I have another question from
> "4.3.4.2 A Volatile Solution". In this section, it mentions:
>
> 1. Implementations are forbidden from tearing an aligned volatile
> access when machine inst
On Nov 11, 2024, at 15:45, Nan Xiao wrote:
>
> Hello,
>
> Greetings from me!
>
> I am reading "4.3.4.2 A Volatile Solution" of perfbook, and come
> across following summary:
>
>To summarize, the volatile keyword can prevent load tearing and
> store tearing in cases where the loads and stor
On Nov 7, 2024, at 05:20, Kent Overstreet wrote:
>
> On Thu, Jul 18, 2024 at 03:13:48PM +0800, Integral wrote:
>> This is a resend of my previous patch with code style optimized as I
>> forgot to add Kent Overstreet in "To". The previous patch is
>> (https://lore.kernel.org/linux-bcachefs/2024071
On Oct 23, 2024, at 18:00, Integral wrote:
>
> Here is the patch which uses existing constant table:
>
> Currently, when using bcachefs-tools to set options, bool-type options
> can only accept 1 or 0. Add support for accepting true/false and yes/no
> for these options.
>
> Signed-off-by: Integ
On Oct 26, 2024, at 00:54, Kent Overstreet wrote:
>
> On Fri, Oct 25, 2024 at 08:56:18PM +0900, Jeongjun Park wrote:
>> c->btree_roots_known[i].b can be NULL. In this case, a NULL pointer
>> dereference
>> occurs, so you need to add code to check the variable.
>>
>> Reported-by: syzbot+b468b9fe
On Oct 24, 2024, at 00:40, Paul E. McKenney wrote:
>
> On Wed, Oct 23, 2024 at 02:58:07PM +0800, Alan Huang wrote:
>> On Oct 22, 2024, at 22:26, Paul E. McKenney wrote:
>>>
>>> On Tue, Oct 22, 2024 at 12:13:12AM -0700, Christoph Hellwig wrote:
>>>>
On Oct 24, 2024, at 00:34, Andrii Nakryiko wrote:
>
> On Tue, Oct 22, 2024 at 11:40 PM Christoph Hellwig wrote:
>>
>> On Tue, Oct 22, 2024 at 10:29:13AM -0700, Andrii Nakryiko wrote:
Would this work?
#define SRCU_INVALID_INDEX -1
>>>
>>> But why?
>>
>> Becaue it ve
On Oct 23, 2024, at 15:21, Piotr Zalewski wrote:
>
> Add NULL check for key returned from bch2_btree_and_journal_iter_peek in
> btree_node_iter_and_journal_peek to avoid NULL ptr dereference in
> bch2_bkey_buf_reassemble.
It would be helpful if the commit message explained why k.k is null in thi
On Oct 23, 2024, at 13:15, Integral wrote:
>
> Here is my latest patch:
>
> Currently, when using bcachefs-tools to set options, bool-type options
> can only accept 1 or 0. Add support for accepting true/false and yes/no
> for these options.
>
> Signed-off-by: Integral
> ---
> fs/bcachefs/opts
On Oct 22, 2024, at 22:26, Paul E. McKenney wrote:
>
> On Tue, Oct 22, 2024 at 12:13:12AM -0700, Christoph Hellwig wrote:
>> On Tue, Oct 22, 2024 at 09:10:18AM +0200, Peter Zijlstra wrote:
>>> Ah, well, the thing that got us here is that we (Andrii and me) wanted
>>> to use -1 as an 'invalid' val
On Oct 22, 2024, at 11:05, Hongbo Li wrote:
>
>
>
> On 2024/10/22 10:38, Alan Huang wrote:
>> On Oct 22, 2024, at 10:26, Hongbo Li wrote:
>>>
>>>
>>>
>>> On 2024/10/21 23:43, Jeongjun Park wrote:
>>>> The size of a.da
On Oct 22, 2024, at 10:26, Hongbo Li wrote:
>
>
>
> On 2024/10/21 23:43, Jeongjun Park wrote:
>> The size of a.data_type is set abnormally large, causing shift-out-of-bounds.
>> To fix this, we need to add validation on a.data_type in
>> alloc_lru_idx_fragmentation().
>> Reported-by: syzbot+7f4
On Oct 21, 2024, at 23:10, Jeongjun Park wrote:
>
> The size of a.data_type is set abnormally large, causing shift-out-of-bounds.
> To fix this, we need to add validation on a.data_type in
> alloc_lru_idx_fragmentation().
>
> Reported-by: syzbot+7f45fa9805c40db3f...@syzkaller.appspotmail.com
>
On Oct 21, 2024, at 22:09, Jeongjun Park wrote:
>
> The size of a.data_type is set abnormally large, causing shift-out-of-bounds.
> To fix this, we need to add validation on a.data_type in
> alloc_lru_idx_fragmentation().
>
> Reported-by: syzbot+7f45fa9805c40db3f...@syzkaller.appspotmail.com
>
On Oct 14, 2024, at 23:57, Karel Zak wrote:
>
>
> Hi Alan,
>
> On Sat, Oct 12, 2024 at 04:57:39PM GMT, Alan Huang wrote:
>> The bcachefs has the helper called mount.bcachefs.
>
> do you mean the following script?
> https://evilpiepirate.org/git/bcachefs-tools.g
Hello Karel,
The bcachefs has the helper called mount.bcachefs.
Currently, there are users using fstab with nofail/user fail to mount,
we would like to know whether other filesystems using similar helper
properly handle this.
This is like commit 06e05eb0f78566b68c44328c37d7c28d8655e9df
(“libmou
On Oct 11, 2024, at 00:20, Kent Overstreet wrote:
>
> On Thu, Oct 10, 2024 at 09:21:50PM GMT, Alan Huang wrote:
>> If the transaction chose itself as a victim before and restarted, it
>> might request a no fail lock request this time. But it might be added to
>> others&
fully RCU-based to solve that unsoundness, but the latency added to trans_put
and additional memory required may not worth it.
Signed-off-by: Alan Huang
---
fs/bcachefs/btree_locking.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/bcachefs/btree_locking.c b/f
s.h:55
arch/arm64/include/asm/irqflags.h:76 arch/arm64/kernel/entry-common.c:165
arch/arm64/kernel/entry-common.c:178 arch/arm64/kernel/entry-common.c:713)
00392 el0t_64_sync_handler (arch/arm64/kernel/entry-common.c:731)
00392 el0t_64_sync (arch/arm64/kernel/entry.S:598)
Signed-off-by: Al
We will get this if we wake up first:
Kernel panic - not syncing: btree_node_write_done leaked btree_trans
since there are still transactions waiting for cycle detectors after
BTREE_NODE_write_in_flight is cleared.
Signed-off-by: Alan Huang
---
fs/bcachefs/btree_io.c | 5 +++--
1 file changed
On Oct 7, 2024, at 03:29, Kent Overstreet wrote:
>
> On Sun, Oct 06, 2024 at 12:04:45PM GMT, Linus Torvalds wrote:
>> On Sat, 5 Oct 2024 at 21:33, Kent Overstreet
>> wrote:
>>>
>>> On Sun, Oct 06, 2024 at 12:30:02AM GMT, Theodore Ts'o wrote:
You may believe that yours is better than
> On Oct 3, 2024, at 17:35, Integral wrote:
>
> Therefore, if my original patch is okay, could you merge it?
I took a look just now, I think you can use lookup_constant.
>
>
> Thanks,
>
> Integral
>
>
> On 7/22/24 12:03 PM, Hongbo Li wrote:
>>
>>
>> On 2024/7/19 6:50, Kent Overstreet wro
The transaction is going to abort, so there will be no cycle involving
this transaction anymore.
Signed-off-by: Alan Huang
---
fs/bcachefs/btree_locking.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/bcachefs/btree_locking.c b/fs/bcachefs/btree_locking.c
index 70f13ab5ba7b
When the cycle doesn't involve the initiator of the cycle detection,
we might choose a transaction that is not involved in the cycle to abort.
It shouldn't be that since it won't break the cycle, this patch
therefore chooses the transaction in the cycle to abort.
Signed-off
This patch introduces a helper function called lock_graph_pop_from,
it pops the graph from i.
Signed-off-by: Alan Huang
---
fs/bcachefs/btree_locking.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/fs/bcachefs/btree_locking.c b/fs/bcachefs/btree_locking.c
index
Signed-off-by: Alan Huang
---
fs/bcachefs/btree_locking.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/bcachefs/btree_locking.c b/fs/bcachefs/btree_locking.c
index 617478fd5351..50d9366d49bd 100644
--- a/fs/bcachefs/btree_locking.c
+++ b/fs/bcachefs
On Sep 30, 2024, at 17:33, Jonas Oberhauser
wrote:
>
>
>
> Am 9/30/2024 um 11:27 AM schrieb Alan Huang:
>> 2024年9月30日 17:15,Alan Huang 写道:
>>>
>>> 2024年9月30日 16:57,Jonas Oberhauser 写道:
>>>>
>>>>
>>>>
>>
2024年9月30日 17:15,Alan Huang 写道:
>
> 2024年9月30日 16:57,Jonas Oberhauser 写道:
>>
>>
>>
>> Am 9/29/2024 um 12:26 AM schrieb Alan Huang:
>>> 2024年9月28日 23:55,Mathieu Desnoyers wrote:
>>>>
>>>> On 2024-09-28 17:49, Alan Stern
2024年9月30日 16:57,Jonas Oberhauser 写道:
>
>
>
> Am 9/29/2024 um 12:26 AM schrieb Alan Huang:
>> 2024年9月28日 23:55,Mathieu Desnoyers wrote:
>>>
>>> On 2024-09-28 17:49, Alan Stern wrote:
>>>> On Sat, Sep 28, 2024 at 11:32:18AM -0400, Mathieu Desnoy
2024年9月29日 07:55,Boqun Feng wrote:
>
>
>
> On Sun, Sep 29, 2024, at 6:26 AM, Alan Huang wrote:
>> 2024年9月28日 23:55,Mathieu Desnoyers wrote:
>>>
>>> On 2024-09-28 17:49, Alan Stern wrote:
>>>> On Sat, Sep 28, 2024 at 11:32:18AM -0400, Mathieu
2024年9月29日 06:10,Alan Huang wrote:
>
> 2024年9月28日 06:18,Jonas Oberhauser wrote:
>>
>>
>>
>> Am 9/27/2024 um 10:10 PM schrieb Mathieu Desnoyers:
>>> On 2024-09-27 21:23, Jonas Oberhauser wrote:
>>> [...]
>>>> That idea seems to be co
2024年9月28日 23:55,Mathieu Desnoyers wrote:
>
> On 2024-09-28 17:49, Alan Stern wrote:
>> On Sat, Sep 28, 2024 at 11:32:18AM -0400, Mathieu Desnoyers wrote:
>>> On 2024-09-28 16:49, Alan Stern wrote:
On Sat, Sep 28, 2024 at 09:51:27AM -0400, Mathieu Desnoyers wrote:
> equality, which does
2024年9月28日 06:18,Jonas Oberhauser wrote:
>
>
>
> Am 9/27/2024 um 10:10 PM schrieb Mathieu Desnoyers:
>> On 2024-09-27 21:23, Jonas Oberhauser wrote:
>> [...]
>>> That idea seems to be confirmed by this (atrocious, not to be copied!)
>>> example:
>>>
>>> int fct_escape_address_of_b(void)
>>> {
2024年9月27日 12:28,Boqun Feng wrote:
>
> On Fri, Sep 27, 2024 at 09:37:50AM +0800, Boqun Feng wrote:
>>
>>
>> On Fri, Sep 27, 2024, at 9:30 AM, Mathieu Desnoyers wrote:
>>> On 2024-09-27 02:01, Boqun Feng wrote:
#define ADDRESS_EQ(var, expr) \
({ \
bool _cmp_res = (unsigned lon
lock_fail_root_changed has not been used since commit
0d7009d7ca99 ("bcachefs: Delete old deadlock avoidance code")
Remove it.
Signed-off-by: Alan Huang
---
fs/bcachefs/btree_iter.c | 2 --
fs/bcachefs/errcode.h| 1 -
2 files changed, 3 deletions(-)
diff --git a/fs/bcachefs/btre
This reverts commit 62448afee714354a26db8a0f3c644f58628f0792.
six_lock_tryupgrade fails only if there is an intent lock held,
it won't fail no matter how many read locks are held.
Signed-off-by: Alan Huang
---
fs/bcachefs/btree_locking.c | 22 --
1 file chang
If the lock has been acquired and unlocked, we don't have to do clear
and wakeup again, though harmless since we hold the intent lock. Merge
the condition might be clearer.
Signed-off-by: Alan Huang
---
Only the title is changed in this version.
The original one is "bcachefs: Remove
2024年9月20日 02:58,Boqun Feng wrote:
>
> On Thu, Sep 19, 2024 at 09:57:12PM +0800, Alan Huang wrote:
> [...]
>>>
>>> I think you're right. (Although the node will be eventually deleted at
>>> cleanup_hazptr_context(), however there could be a lo
2024年9月19日 15:10,Boqun Feng wrote:
>
> On Thu, Sep 19, 2024 at 02:39:13PM +0800, Lai Jiangshan wrote:
>> On Tue, Sep 17, 2024 at 10:34 PM Boqun Feng wrote:
>>
>>> +static void hazptr_context_snap_readers_locked(struct hazptr_reader_tree
>>> *tree,
>>> +
2024年9月19日 15:10,Boqun Feng wrote:
>
> On Thu, Sep 19, 2024 at 02:39:13PM +0800, Lai Jiangshan wrote:
>> On Tue, Sep 17, 2024 at 10:34 PM Boqun Feng wrote:
>>
>>> +static void hazptr_context_snap_readers_locked(struct hazptr_reader_tree
>>> *tree,
>>> +
2024年9月19日 15:10,Boqun Feng wrote:
>
> On Thu, Sep 19, 2024 at 02:39:13PM +0800, Lai Jiangshan wrote:
>> On Tue, Sep 17, 2024 at 10:34 PM Boqun Feng wrote:
>>
>>> +static void hazptr_context_snap_readers_locked(struct hazptr_reader_tree
>>> *tree,
>>> +
2024年9月17日 22:33,Boqun Feng wrote:
>
> Hazard pointers [1] provide a way to dynamically distribute refcounting
> and can be used to improve the scalability of refcounting without
> significant space cost.
>
> Hazard pointers are similar to RCU: they build the synchronization
> between two part,
2024年9月1日 11:10,Kent Overstreet wrote:
>
> On Sun, Sep 01, 2024 at 10:50:37AM GMT, Alan Huang wrote:
>>> 2024年9月1日 09:09,Kent Overstreet wrote:
>>>
>>> On Tue, Aug 27, 2024 at 11:14:48PM GMT, Alan Huang wrote:
>>>> If the reader acquires the
> 2024年9月1日 09:09,Kent Overstreet wrote:
>
> On Tue, Aug 27, 2024 at 11:14:48PM GMT, Alan Huang wrote:
>> If the reader acquires the read lock and then the writer enters the slow
>> path, while the reader proceeds to the unlock path, the following scenario
>> c
If the lock has been acquired and unlocked, we don't have to do clear
and wakeup again, though harmless since we hold the intent lock. Merge
the condition might be clearer.
Signed-off-by: Alan Huang
---
fs/bcachefs/six.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
der: smp_mb()
reader: state = atomic_read(&lock->state) (there is no waiting flag set)
writer: six_set_bitmask()
then the writer will sleep forever.
Signed-off-by: Alan Huang
---
fs/bcachefs/six.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/fs/bcachefs/
x27;t need
to adjust the rw aux tree.
Signed-off-by: Alan Huang
---
Changes in v2:
- rw_aux_tree_build_entry is renamed to rw_aux_tree_insert_entry
- l is renamed to idx
- two comments are removed since there are assertions
- two parameters of the helper function are removed since they can be
x27;t need
to adjust the rw aux tree.
Signed-off-by: Alan Huang
---
fs/bcachefs/bset.c | 116 +
1 file changed, 65 insertions(+), 51 deletions(-)
diff --git a/fs/bcachefs/bset.c b/fs/bcachefs/bset.c
index 1b66b2c7e018..c5fffed88c46 100644
--- a/fs/bcache
iter here is unused, remove it.
Signed-off-by: Alan Huang
---
fs/bcachefs/bset.c | 1 -
fs/bcachefs/bset.h | 4 ++--
fs/bcachefs/btree_trans_commit.c | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/bcachefs/bset.c b/fs/bcachefs/bset.c
index
After reducing the search range when building the aux tree, the prev array
stuff is no longer useful, so remove it.
Signed-off-by: Alan Huang
---
fs/bcachefs/bset.c | 34 --
1 file changed, 4 insertions(+), 30 deletions(-)
diff --git a/fs/bcachefs/bset.c b/fs
ey
of node i. Once the search range is minimized, the mantissa we are
calculating can have more useful bits, thus reduce the slow path
comparison. Besides, we can now remove all the prev array stuff.
Signed-off-by: Alan Huang
---
fs/bcachefs/bset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletio
comparison when search a key.
The prev array stuff becomes useless after minimizing the search range,
so this series also removes the prev array stuff.
Alan Huang (2):
bcachefs: Minimize the search range used to calculate the mantissa
bcachefs: Remove the prev array stuff
fs/bcachefs/bset.c | 36
After reducing the search range when building the aux tree, the prev array
stuff is no longer useful, so remove it.
Signed-off-by: Alan Huang
---
fs/bcachefs/bset.c | 31 +++
1 file changed, 3 insertions(+), 28 deletions(-)
diff --git a/fs/bcachefs/bset.c b/fs
ey
of node i. Once the search range is minimized, the mantissa we are
calculating can have more useful bits, thus reduce the slow path
comparison. Besides, we can now remove all the prev array stuff.
Signed-off-by: Alan Huang
---
fs/bcachefs/bset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletio
array stuff.
Alan Huang (2):
bcachefs: Minimize the search range used to calculate the mantissa
bcachefs: Remove the prev array stuff
fs/bcachefs/bset.c | 33 -
1 file changed, 4 insertions(+), 29 deletions(-)
--
2.45.2
The idx parameter of bkey_mantissa_bits_dropped is unused, remove it.
Signed-off-by: Alan Huang
---
fs/bcachefs/bset.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/bcachefs/bset.c b/fs/bcachefs/bset.c
index a2a87ed09f37..00a821f617a5 100644
--- a/fs/bcachefs
The idx parameter of bkey_mantissa became unused since commit
b904a7991802 ("bcachefs: Go back to 16 bit mantissa bkey floats"),
so remove it.
Signed-off-by: Alan Huang
---
fs/bcachefs/bset.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/bcachefs/b
This series simply removes two unused parameters.
Alan Huang (2):
bcachefs: Remove unused parameter of bkey_mantissa
bcachefs: Remove unused parameter of bkey_mantissa_bits_dropped
fs/bcachefs/bset.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
--
2.45.2
This patch replaces open-coded extra computation to eytzinger1_extra.
Signed-off-by: Alan Huang
---
fs/bcachefs/bset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/bcachefs/bset.c b/fs/bcachefs/bset.c
index b95deeb83071..e7c44f35f0c5 100644
--- a/fs/bcachefs/bset.c
1 - 100 of 138 matches
Mail list logo