On Tue, Jul 29, 2025 at 05:53:23AM +0100, Al Viro wrote: > FAT12 problem is that FAT entries being accessed there are 12-bit, packed in > pairs into an array of 3-byte values. PS: they most definitely can cross the cacheline boundaries - cacheline size is not going to be a multiple of 3 on anything realistic. Hell, they can cross *block* boundaries (which is why for FAT12 that code is using two separate pointers - most of the time they point to adjacent bytes, but if one byte is in one block and the next one is in another...; that's what that if in fat12_ent_set_ptr() is doing)... We could map the entire array contiguously (and it might simplify some of the logics there), but it's not going to avoid the problem with a single entry occupying a byte in one cacheline and half of a byte in another. So nothing like cmpxchg would suffice - we need a spinlock for FAT12 case.