Project

General

Profile

Actions

Bug #40863

closed

cephfs-shell: rmdir with -p attempts to delete non-dir files as well

Added by Rishabh Dave almost 5 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
cephfs-shell
Labels (FS):
task(easy)
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Going through do_rmdir in cephfs-shell, I don't see any checks that stop the method from deleting non-directory files.

Reproducing the bug -

CephFS:~/>>> ls dir2/
file1
CephFS:~/>>> rmdir -p dir2
CephFS:~/>>> ls 

Ideally, rmdir shouldn't do that since it is only suppose to delete empty directories.

Actions

Also available in: Atom PDF