Re: [PATCH 2/2] efivarfs: support freeze/thaw
From: Christian Brauner
Date: Wed Apr 02 2025 - 03:45:02 EST
On Tue, Apr 01, 2025 at 03:31:13PM -0400, James Bottomley wrote:
> On Mon, 2025-03-31 at 14:42 +0200, Christian Brauner wrote:
> [...]
> > + pr_info("efivarfs: resyncing variable state\n");
> > + for (;;) {
> > + int err;
> > + size_t size;
> > + struct inode *inode;
> > + struct efivar_entry *entry;
> > +
> > + child = find_next_child(sb->s_root, child);
> > + if (!child)
> > + break;
> > +
> > + inode = d_inode(child);
> > + entry = efivar_entry(inode);
> > +
> > + err = efivar_entry_size(entry, &size);
> > + if (err)
> > + size = 0;
> > + else
> > + size += sizeof(__u32);
> > +
> > + inode_lock(inode);
> > + i_size_write(inode, size);
> > + inode_unlock(inode);
> > +
> > + if (!err)
> > + continue;
> > +
> > + /* The variable doesn't exist anymore, delete it. */
>
> The message that should be here got deleted. We now only print
> messages about variables we add not variables we remove. I get that
> the code is a bit chatty here, but it should either print both the
> removing and adding messages or print neither, I think.
Ok, I added the deletion printk line back.