https://tracker.ceph.com/https://tracker.ceph.com/favicon.ico2018-09-13T02:57:36ZCeph CephFS - Bug #35961: nfs-ganesha: ceph_fsal_setattr2 returned Operation not permittedhttps://tracker.ceph.com/issues/35961?journal_id=1206162018-09-13T02:57:36Zshangzhong zhu
<ul></ul><p>nfs-ganesha 2.6.3<br />ceph version 13.2.1<br />nfs client: nfs-utils-1.3.0-0.54.el7.x86_64<br />mount nfs export directory with NFSV3</p> CephFS - Bug #35961: nfs-ganesha: ceph_fsal_setattr2 returned Operation not permittedhttps://tracker.ceph.com/issues/35961?journal_id=1208662018-09-17T13:37:03ZPatrick Donnellypdonnell@redhat.com
<ul><li><strong>Assignee</strong> set to <i>Jeff Layton</i></li></ul> CephFS - Bug #35961: nfs-ganesha: ceph_fsal_setattr2 returned Operation not permittedhttps://tracker.ceph.com/issues/35961?journal_id=1208812018-09-17T16:05:37ZJeff Laytonjlayton@redhat.com
<ul></ul><p>It fell down on the truncate. The setattr mask shows CEPH_SETATTR_MTIME and CEPH_SETATTR_SIZE. I suspect this check in may_setattr is wrong, but I'll need to go over the logic in detail to determine why.</p>
<pre>
if (mask & (CEPH_SETATTR_CTIME | CEPH_SETATTR_BTIME |
CEPH_SETATTR_MTIME | CEPH_SETATTR_ATIME)) {
if (perms.uid() != 0 && perms.uid() != in->uid) {
int check_mask = CEPH_SETATTR_CTIME | CEPH_SETATTR_BTIME;
if (!(mask & CEPH_SETATTR_MTIME_NOW))
check_mask |= CEPH_SETATTR_MTIME;
if (!(mask & CEPH_SETATTR_ATIME_NOW))
check_mask |= CEPH_SETATTR_ATIME;
if (check_mask & mask) {
goto out;
} else {
r = inode_permission(in, perms, MAY_WRITE);
if (r < 0)
goto out;
}
}
}
</pre> CephFS - Bug #35961: nfs-ganesha: ceph_fsal_setattr2 returned Operation not permittedhttps://tracker.ceph.com/issues/35961?journal_id=1208872018-09-17T17:41:10ZJeff Laytonjlayton@redhat.com
<ul></ul><p>I take it back. The check is correct. What's happening is that ganesha is just calling CEPH_SETATTR_MTIME with the current time and that is causing the check to fail. What we probably need to do is expose the CEPH_SETATTR_MTIME_NOW in the header file and then have ganesha use it (ditto with the ATIME one).</p> CephFS - Bug #35961: nfs-ganesha: ceph_fsal_setattr2 returned Operation not permittedhttps://tracker.ceph.com/issues/35961?journal_id=1209962018-09-19T06:57:51Zshangzhong zhu
<ul></ul><p><strong>PR</strong>: <a class="external" href="https://github.com/ceph/ceph/pull/24170">https://github.com/ceph/ceph/pull/24170</a></p> CephFS - Bug #35961: nfs-ganesha: ceph_fsal_setattr2 returned Operation not permittedhttps://tracker.ceph.com/issues/35961?journal_id=1209972018-09-19T07:01:57Zshangzhong zhu
<ul></ul><p>Patch for nfs-ganesha submitted:</p>
<p><a class="external" href="https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/426017">https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/426017</a></p> CephFS - Bug #35961: nfs-ganesha: ceph_fsal_setattr2 returned Operation not permittedhttps://tracker.ceph.com/issues/35961?journal_id=1210892018-09-20T16:18:02ZPatrick Donnellypdonnell@redhat.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Fix Under Review</i></li><li><strong>Assignee</strong> changed from <i>Jeff Layton</i> to <i>shangzhong zhu</i></li><li><strong>Target version</strong> set to <i>v14.0.0</i></li><li><strong>Source</strong> set to <i>Community (dev)</i></li><li><strong>Backport</strong> set to <i>mimic,luminous</i></li><li><strong>ceph-qa-suite</strong> deleted (<del><i>fs</i></del>)</li><li><strong>Component(FS)</strong> deleted (<del><i>Client, Ganesha FSAL</i></del>)</li></ul> CephFS - Bug #35961: nfs-ganesha: ceph_fsal_setattr2 returned Operation not permittedhttps://tracker.ceph.com/issues/35961?journal_id=1210902018-09-20T16:18:34ZPatrick Donnellypdonnell@redhat.com
<ul><li><strong>Component(FS)</strong> <i>Ganesha FSAL</i> added</li></ul> CephFS - Bug #35961: nfs-ganesha: ceph_fsal_setattr2 returned Operation not permittedhttps://tracker.ceph.com/issues/35961?journal_id=1213572018-09-24T21:50:42ZPatrick Donnellypdonnell@redhat.com
<ul><li><strong>Status</strong> changed from <i>Fix Under Review</i> to <i>Pending Backport</i></li></ul> CephFS - Bug #35961: nfs-ganesha: ceph_fsal_setattr2 returned Operation not permittedhttps://tracker.ceph.com/issues/35961?journal_id=1215102018-09-26T16:17:14ZNathan Cutlerncutler@suse.cz
<ul><li><strong>Copied to</strong> <i><a class="issue tracker-9 status-3 priority-4 priority-default closed" href="/issues/36205">Backport #36205</a>: mimic: nfs-ganesha: ceph_fsal_setattr2 returned Operation not permitted</i> added</li></ul> CephFS - Bug #35961: nfs-ganesha: ceph_fsal_setattr2 returned Operation not permittedhttps://tracker.ceph.com/issues/35961?journal_id=1215122018-09-26T16:17:21ZNathan Cutlerncutler@suse.cz
<ul><li><strong>Copied to</strong> <i><a class="issue tracker-9 status-3 priority-4 priority-default closed" href="/issues/36206">Backport #36206</a>: luminous: nfs-ganesha: ceph_fsal_setattr2 returned Operation not permitted</i> added</li></ul> CephFS - Bug #35961: nfs-ganesha: ceph_fsal_setattr2 returned Operation not permittedhttps://tracker.ceph.com/issues/35961?journal_id=1269072019-01-07T20:14:55ZPatrick Donnellypdonnell@redhat.com
<ul><li><strong>Status</strong> changed from <i>Pending Backport</i> to <i>Resolved</i></li></ul>