Project

General

Profile

Actions

Bug #268

closed

cfuse: return EROFS when writing to snaps

Added by Sage Weil almost 14 years ago. Updated over 7 years ago.

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

0%

Source:
Tags:
Backport:
Regression:
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Lots of places to check.. setattr, create, mkdir, mknod, symlink, link, unlink, rename, setxattr... If the inode or dir inode isn't CEPH_NOSNAP, return EROFS.

Date: Fri, 09 Jul 2010 15:22:14 -0400
From: Adam C. Emerson <aemerson@linuxbox.com>
To: Ceph-devel <ceph-devel@vger.kernel.org>
Subject: Attempt to create a new file in a snapshot crashes the MDS

I know it's not supported, but I tried it out to see what kind of
error behaviour I would get.

The following were preformed on a simple ceph filesystem (one monitor,
one mds, one osd all on the same machine) running current unstable
with the filesystem mounted via cfuse:

/mnt# mkdir foo
/mnt# cd foo
/mnt/foo# cat > something
These are the contents of the file.
/mnt/foo# cd .snap
/mnt/foo/.snap# mkdir old
/mnt/foo/.snap# cd ..
/mnt/foo# cat > something
These are different contents of the file.
/mnt/foo# cd .snap
/mnt/foo/.snap# ls
old/
/mnt/foo/.snap# cd old 
root@seasalt:/mnt/foo/.snap/old# ls
something
/mnt/foo/.snap/old# cat something 
These are the contents of the file.
/mnt/foo/.snap/old# cat > something
zsh: invalid argument: something
/mnt/foo/.snap/old# cat > somthingelse
These are divergent contents.

This last command hangs, and in the MDS log I find:
mds/CDir.cc: In function 'CDentry* CDir::add_null_dentry(const std::string&,
snapid_t, snapid_t)':
mds/CDir.cc:225: FAILED assert(lookup_exact_snap(dname, last) == 0)
Actions #1

Updated by Greg Farnum almost 14 years ago

  • Assignee set to Greg Farnum
Actions #2

Updated by Greg Farnum almost 14 years ago

  • Status changed from New to Closed

Fixed in commit:145429118d79d532852c386b4260d22b8b6b08a3.

Actions #3

Updated by John Spray over 7 years ago

  • Project changed from Ceph to CephFS
  • Category deleted (11)
  • Target version deleted (v0.21)

Bulk updating project=ceph category=ceph-fuse issues to move to fs project so that we can remove the ceph-fuse category from the ceph project

Actions

Also available in: Atom PDF