The Samba-Bugzilla – Attachment 18429 Details for
Bug 15686
Add new vfs_ceph module (based on low level API)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch from master for v4-21-test (part 2)
4.21.patch (text/plain), 4.04 KB, created by
Anoop C S
on 2024-08-30 11:07:14 UTC
(
hide
)
Description:
patch from master for v4-21-test (part 2)
Filename:
MIME Type:
Creator:
Anoop C S
Created:
2024-08-30 11:07:14 UTC
Size:
4.04 KB
patch
obsolete
>From 47004036420a13c4a6a476f05b33ca4df579ddc8 Mon Sep 17 00:00:00 2001 >From: Shachar Sharon <ssharon@redhat.com> >Date: Tue, 20 Aug 2024 12:06:40 +0300 >Subject: [PATCH 1/2] vfs_ceph_new: add missing newline in debug-logging > >Commit d00f20f3 ("vfs_ceph_new: debug-log upon libcephfs low-level >calls") introduced debug-logging before each call to libcephfs low-level >APIs. Unfortunately, one of the logging messages missed the terminating >newline ('\n') character. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15686 > >Signed-off-by: Shachar Sharon <ssharon@redhat.com> >Reviewed-by: John Mulligan <jmulligan@samba.org> >Reviewed-by: Anoop C S <anoopcs@samba.org> > >Autobuild-User(master): Anoop C S <anoopcs@samba.org> >Autobuild-Date(master): Wed Aug 21 14:18:07 UTC 2024 on atb-devel-224 > >(cherry picked from commit cbba4008a7fb9e6e91d0568f25ac481b60fda96f) >--- > source3/modules/vfs_ceph_new.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/source3/modules/vfs_ceph_new.c b/source3/modules/vfs_ceph_new.c >index 25e78444fb5..9c36f762aa6 100644 >--- a/source3/modules/vfs_ceph_new.c >+++ b/source3/modules/vfs_ceph_new.c >@@ -730,7 +730,7 @@ static int vfs_ceph_ll_lookup(const struct vfs_handle_struct *handle, > struct UserPerm *uperm = NULL; > int ret = -1; > >- DBG_DEBUG("[ceph] ceph_ll_lookup: parent-ino=%" PRIu64 " name=%s", >+ DBG_DEBUG("[ceph] ceph_ll_lookup: parent-ino=%" PRIu64 " name=%s\n", > parent->ino, name); > > uperm = vfs_ceph_userperm_new(handle); >-- >2.46.0 > > >From 7875c6e93e784f6e6aa7ccc3ec79277e97a6b115 Mon Sep 17 00:00:00 2001 >From: Shachar Sharon <ssharon@redhat.com> >Date: Tue, 20 Aug 2024 12:45:07 +0300 >Subject: [PATCH 2/2] vfs_ceph_new: handle case of readlinkat with empty name > string > >Commit 53c9269b (vfs_ceph_new: use low-level APIs for symlink/readlink) >introduced readlinkat using libcephfs low-level APIs. However, it does >not handle properly the case where readlinkat operates on empty name >string (see man readlinkat(2)), such as: > > fd = openat(dirfd, symname, O_PATH | O_NOFOLLOW, 0); > readlinkat(fd, "", buf, bufsiz); > >Handle this special case of readlinkat with empty name string by using >a reference to the symlink inode itself. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15686 > >Signed-off-by: Shachar Sharon <ssharon@redhat.com> >Reviewed-by: Anoop C S <anoopcs@samba.org> >Reviewed-by: Guenther Deschner <gd@samba.org> > >Autobuild-User(master): Anoop C S <anoopcs@samba.org> >Autobuild-Date(master): Fri Aug 30 10:42:27 UTC 2024 on atb-devel-224 > >(cherry picked from commit 22182f90e8e7876a9895f77e736d2b96b18b174f) >--- > source3/modules/vfs_ceph_new.c | 33 ++++++++++++++++++++++----------- > 1 file changed, 22 insertions(+), 11 deletions(-) > >diff --git a/source3/modules/vfs_ceph_new.c b/source3/modules/vfs_ceph_new.c >index 9c36f762aa6..8d4866e054b 100644 >--- a/source3/modules/vfs_ceph_new.c >+++ b/source3/modules/vfs_ceph_new.c >@@ -2455,7 +2455,6 @@ static int vfs_ceph_readlinkat(struct vfs_handle_struct *handle, > size_t bufsiz) > { > int result = -1; >- struct vfs_ceph_iref iref = {0}; > struct vfs_ceph_fh *dircfh = NULL; > > DBG_DEBUG("[CEPH] readlinkat(%p, %s, %p, %llu)\n", >@@ -2468,17 +2467,29 @@ static int vfs_ceph_readlinkat(struct vfs_handle_struct *handle, > if (result != 0) { > goto out; > } >- result = vfs_ceph_ll_lookupat(handle, >- dircfh, >- smb_fname->base_name, >- &iref); >- if (result != 0) { >- goto out; >- } >- >- result = vfs_ceph_ll_readlinkat(handle, dircfh, &iref, buf, bufsiz); >+ if (strcmp(smb_fname->base_name, "") != 0) { >+ struct vfs_ceph_iref iref = {0}; > >- vfs_ceph_iput(handle, &iref); >+ result = vfs_ceph_ll_lookupat(handle, >+ dircfh, >+ smb_fname->base_name, >+ &iref); >+ if (result != 0) { >+ goto out; >+ } >+ result = vfs_ceph_ll_readlinkat(handle, >+ dircfh, >+ &iref, >+ buf, >+ bufsiz); >+ vfs_ceph_iput(handle, &iref); >+ } else { >+ result = vfs_ceph_ll_readlinkat(handle, >+ dircfh, >+ &dircfh->iref, >+ buf, >+ bufsiz); >+ } > out: > DBG_DEBUG("[CEPH] readlinkat(...) = %d\n", result); > return status_code(result); >-- >2.46.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
gd
:
review+
anoopcs
:
ci-passed+
Actions:
View
Attachments on
bug 15686
:
18398
|
18399
|
18400
|
18412
|
18414
|
18417
|
18428
| 18429