($INBOX_DIR/description missing)
 help / color / Atom feed
* [PATCH] ovl: add debug print to ovl_do_getxattr()
@ 2021-04-10  9:17 Amir Goldstein
  2021-04-12  8:22 ` Miklos Szeredi
  0 siblings, 1 reply; 2+ messages in thread
From: Amir Goldstein @ 2021-04-10  9:17 UTC (permalink / raw)
  To: Miklos Szeredi; +Cc: Chris Murphy, linux-unionfs

It was the only ovl_do helper missing it.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
 fs/overlayfs/overlayfs.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h
index 2322f854533c..d1e08d804207 100644
--- a/fs/overlayfs/overlayfs.h
+++ b/fs/overlayfs/overlayfs.h
@@ -186,7 +186,12 @@ static inline ssize_t ovl_do_getxattr(struct ovl_fs *ofs, struct dentry *dentry,
 				      size_t size)
 {
 	const char *name = ovl_xattr(ofs, ox);
-	return vfs_getxattr(&init_user_ns, dentry, name, value, size);
+	int err = vfs_getxattr(&init_user_ns, dentry, name, value, size);
+	int len = (value && err > 0) ? err : 0;
+
+	pr_debug("getxattr(%pd2, \"%s\", \"%*pE\", %zu, 0) = %i\n",
+		 dentry, name, min(len, 48), value, size, err);
+	return err;
 }
 
 static inline int ovl_do_setxattr(struct ovl_fs *ofs, struct dentry *dentry,
-- 
2.30.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ovl: add debug print to ovl_do_getxattr()
  2021-04-10  9:17 [PATCH] ovl: add debug print to ovl_do_getxattr() Amir Goldstein
@ 2021-04-12  8:22 ` Miklos Szeredi
  0 siblings, 0 replies; 2+ messages in thread
From: Miklos Szeredi @ 2021-04-12  8:22 UTC (permalink / raw)
  To: Amir Goldstein; +Cc: Chris Murphy, overlayfs

On Sat, Apr 10, 2021 at 11:17 AM Amir Goldstein <amir73il@gmail.com> wrote:
>
> It was the only ovl_do helper missing it.
>
> Signed-off-by: Amir Goldstein <amir73il@gmail.com>

Applied.

Thanks,
Miklos

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-10  9:17 [PATCH] ovl: add debug print to ovl_do_getxattr() Amir Goldstein
2021-04-12  8:22 ` Miklos Szeredi

($INBOX_DIR/description missing)

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-unionfs/0 linux-unionfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-unionfs linux-unionfs/ https://lore.kernel.org/linux-unionfs \
		linux-unionfs@vger.kernel.org
	public-inbox-index linux-unionfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-unionfs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git