On Freitag, 22. März 2019 09:23:29 CET Coly Li wrote: > On 2019/3/22 4:18 下午, Dennis Schridde wrote: > > On Freitag, 22. März 2019 08:04:20 CET Coly Li wrote: > >> On 2019/3/22 2:14 下午, Coly Li wrote: > >>> On 2019/3/21 10:16 下午, Coly Li wrote: > >>>> Now I am able to understand your patch. Yes this patch may > >>>> fix one of the condition that jset get lost. > >>>> > >>>> We should have this fix in v5.1, I will handle the format > >>>> issue. And if you don't mind I may re-compose a commit log to > >>>> explain what exactly is fixed. > >>> > >>> When I review the patch, I feel there is one point I still do > >>> not understand, could you please give me more hint ? > >>> > >>> From your commit log, "so when we doing replay, journals from > >>> last_seq_wrote to last_seq_now are missing.", can you show me > >>> the code to explain how such condition happens ? > >> > >> Aha, I realize this is for discard enabled condition. Hmm, but > >> discard is disabled by default. > >> > >> Hi Dennis, > >> > >> Is discard enabled in your environment ? Or it is just disabled > >> by default. > > > > How do I figure that out? (I currently only have access to /etc, > > my previous 4.18 or 4.19 kernel build config and whatever metadata > > bcache tools can provide me with.) > > Hi Dennis, > > The sysfs interface is /sys/fs/bcache/<cacheset UUID>/cache0/discard > > By default it should be 0 (disabled). I used a Fedora 29 live system with Linux 4.18.16-300.fc29. /sys/fs/bcache is empty except for "regiter" and "register_quiet". Probably because the bcache kernel module unregisters the cache set after encountering the I/O errors? Generally speaking `make-bcache --discard` (which enables usage of the TRIM instruction on SSDs [1]) *might* be an option I could have enabled. Without examining the actual setting I cannot say for sure, though. --Dennis [1]: https://wiki.ubuntu.com/ServerTeam/Bcache
Attachment:
signature.asc
Description: This is a digitally signed message part.