Hi,

On Tue, Dec 24, 2024 at 6:54 AM Michael Tokarev <m...@tls.msk.ru> wrote:
>
> Hi!
>
> The no-unsafe-io workaround in dpkg was needed for 2005-era ext2fs
> issues, where a power-cut in the middle of filesystem metadata
> operation (which dpkg does a lot) might result in in unconsistent
> filesystem state.  This workaround slowed down dpkg operations
> quite significantly (and has been criticised due to that a lot,
> the difference is really significant).
>
> The workaround is to issue fsync() after almost every filesystem
> operation, instead of after each transaction as dpkg did before.
>
> Once again: dpkg has always been doing "safe io", the workaround
> was needed for ext2fs only, - it was the filesystem which was
> broken, not dpkg.
>
> Today, doing an fsync() really hurts, - with SSDs/flash it reduces
> the lifetime of the storage, for many modern filesystems it is a
> costly operation which bloats the metadata tree significantly,
> resulting in all further operations becomes inefficient.
>
> How about turning this option - force-unsafe-io - to on by default
> in 2025?  That would be a great present for 2025 New Year! :)
>
> Thanks,
>
> /mjt
>

It sounds like a really interesting idea.
Merry Christmas and a Happy New Year!

https://wiki.debian.org/Teams/Dpkg/FAQ#:~:text=Use%20the%20dpkg%20%2D%2Dforce,losing%20data%2C%20use%20with%20care.

-- 
Cheers,
Leandro Cunha

Reply via email to