On Wed, Feb 12, 2025 at 10:45 AM Jordi Pujol <jordipujolp@xxxxxxxxx> wrote: > > Hello, > > I allways work on a Live system that uses overlayfs, and also remaster > the pristine filesystem using overlayfs. > After upgrading kernel to version 6.12 have experienced several > filesystem problems, thus have compared the overlayfs code of previous > versions. Thank you for the report, but we can do very little with the information "experienced several filesystem problems" Can you elaborate? > By intuition, have found that these lines have been removed from > version 6.11. This difference is key: > > overlayfs-sync-upper.patch > --- linux-6.13.2/fs/overlayfs/super.c > +++ linux-6.11.11/fs/overlayfs/super.c > @@ -202,9 +202,15 @@ > int ret; > > ret = ovl_sync_status(ofs); > - > - if (ret < 0) > + /* > + * We have to always set the err, because the return value isn't > + * checked in syncfs, and instead indirectly return an error via > + * the sb's writeback errseq, which VFS inspects after this call. > + */ > + if (ret < 0) { > + errseq_set(&sb->s_wb_err, -EIO); > return -EIO; > + } > > if (!ret) > return ret; > > In latest versions the filesystems work like a charm when applying > previous patch Please provide an objective comparison between the behavior of "filesystem problems" vs. "filesystem work like a charm". I am assuming that you are using the "volatile" overlayfs feature? otherwise, unless I am missing something, the removal of code above should not have had any effect. The removed code, would have propagate the s_wb_err state from the upper fs sb to overlayfs sb, but the only code that checks s_wb_err state is syncfs() should be returning -EIO in this case anyway, so I am not seeing where the change of behavior you are observing is coming from. Are you using a patched kernel or an out of tree filesystem underneath overlayfs? Thanks, Amir.