Bug 1065287
| Summary: | DHT : - rm -rf failed for few files with error 'Directory not empty' error on mount point | ||
|---|---|---|---|
| Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | Rachana Patel <racpatel> |
| Component: | glusterfs | Assignee: | Susant Kumar Palai <spalai> |
| Status: | CLOSED DUPLICATE | QA Contact: | amainkar |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 2.1 | CC: | nlevinki, nsathyan, spalai, vbellur |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-06-03 08:54:52 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Rachana Patel
2014-02-14 09:36:35 UTC
Sent one possible fix for the bug: http://review.gluster.org/#/c/7733/. The fix addresses the following issue. * POSIX_READDIRP function fills the stat information of all the entries present in the directory. If lstat of an entry fails, it used to fill the stat information of the current file with that of the the previous entry read. e.g let say the current entry was a file and the previous entry read was a directory. And if the lstat of current file failed, the stat info for current file will be filled with that of the previous directory. Hence, the file will be treated as a directory. Now one of the following two scenario may happen as dht_readdirp takes directory entry only from the first up subvolume. 1) If the file (now a directory for dht because of wrong stat) is not present on the first_up_subvolume, then it won't be processed for deletion. 2) Even if it is present on first_up_subvolume, a rmdir call will go for the file(corrupted stat) which will result in to "Not a directory" ERROR. And we will see a "Directory Not Empty" error while trying to unlink the parent directory. *** This bug has been marked as a duplicate of bug 960910 *** Marked duplicate as the fix :http://review.gluster.org/#/c/7733/ is a possible fix for both "Directory Not empty" and "Is a directory" error. Please reopen this bug if reproduced in future. |