Re: [PATCH v4] f2fs: add sysfs nodes to get runtime compression stat

From: Greg KH
Date: Fri Mar 12 2021 - 09:50:04 EST


On Fri, Mar 12, 2021 at 11:42:04PM +0900, Daeho Jeong wrote:
> So, do you want we protect the values here with spin_lock and just
> read without spin_lock in sysfs read part?

I would not use any lock at all if this were my code. Remember, this is
for debugging/information only, right? And the data is always "stale"
so what is it going to be used for?

thanks,

greg k-h