Skip to content

Commit 7ba2090

Browse files
committed
Merge tag 'ceph-for-6.6-rc1' of https://github.com/ceph/ceph-client
Pull ceph updates from Ilya Dryomov: "Mixed with some fixes and cleanups, this brings in reasonably complete fscrypt support to CephFS! The list of things which don't work with encryption should be fairly short, mostly around the edges: fallocate (not supported well in CephFS to begin with), copy_file_range (requires re-encryption), non-default striping patterns. This was a multi-year effort principally by Jeff Layton with assistance from Xiubo Li, Luís Henriques and others, including several dependant changes in the MDS, netfs helper library and fscrypt framework itself" * tag 'ceph-for-6.6-rc1' of https://github.com/ceph/ceph-client: (53 commits) ceph: make num_fwd and num_retry to __u32 ceph: make members in struct ceph_mds_request_args_ext a union rbd: use list_for_each_entry() helper libceph: do not include crypto/algapi.h ceph: switch ceph_lookup/atomic_open() to use new fscrypt helper ceph: fix updating i_truncate_pagecache_size for fscrypt ceph: wait for OSD requests' callbacks to finish when unmounting ceph: drop messages from MDS when unmounting ceph: update documentation regarding snapshot naming limitations ceph: prevent snapshot creation in encrypted locked directories ceph: add support for encrypted snapshot names ceph: invalidate pages when doing direct/sync writes ceph: plumb in decryption during reads ceph: add encryption support to writepage and writepages ceph: add read/modify/write to ceph_sync_write ceph: align data in pages in ceph_sync_write ceph: don't use special DIO path for encrypted inodes ceph: add truncate size handling support for fscrypt ceph: add object version support for sync read libceph: allow ceph_osdc_new_request to accept a multi-op read ...
2 parents 744a759 + ce0d5bd commit 7ba2090

File tree

28 files changed

+4484
-528
lines changed

28 files changed

+4484
-528
lines changed

Documentation/filesystems/ceph.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ a snapshot on any subdirectory (and its nested contents) in the
5757
system. Snapshot creation and deletion are as simple as 'mkdir
5858
.snap/foo' and 'rmdir .snap/foo'.
5959

60+
Snapshot names have two limitations:
61+
62+
* They can not start with an underscore ('_'), as these names are reserved
63+
for internal usage by the MDS.
64+
* They can not exceed 240 characters in size. This is because the MDS makes
65+
use of long snapshot names internally, which follow the format:
66+
`_<SNAPSHOT-NAME>_<INODE-NUMBER>`. Since filenames in general can't have
67+
more than 255 characters, and `<node-id>` takes 13 characters, the long
68+
snapshot names can take as much as 255 - 1 - 1 - 13 = 240.
69+
6070
Ceph also provides some recursive accounting on directories for nested
6171
files and bytes. That is, a 'getfattr -d foo' on any directory in the
6272
system will reveal the total number of nested regular files and

drivers/block/rbd.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7199,7 +7199,6 @@ static void rbd_dev_remove_parent(struct rbd_device *rbd_dev)
71997199
static ssize_t do_rbd_remove(const char *buf, size_t count)
72007200
{
72017201
struct rbd_device *rbd_dev = NULL;
7202-
struct list_head *tmp;
72037202
int dev_id;
72047203
char opt_buf[6];
72057204
bool force = false;
@@ -7226,8 +7225,7 @@ static ssize_t do_rbd_remove(const char *buf, size_t count)
72267225

72277226
ret = -ENOENT;
72287227
spin_lock(&rbd_dev_list_lock);
7229-
list_for_each(tmp, &rbd_dev_list) {
7230-
rbd_dev = list_entry(tmp, struct rbd_device, node);
7228+
list_for_each_entry(rbd_dev, &rbd_dev_list, node) {
72317229
if (rbd_dev->dev_id == dev_id) {
72327230
ret = 0;
72337231
break;

fs/ceph/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ ceph-y := super.o inode.o dir.o file.o locks.o addr.o ioctl.o \
1212

1313
ceph-$(CONFIG_CEPH_FSCACHE) += cache.o
1414
ceph-$(CONFIG_CEPH_FS_POSIX_ACL) += acl.o
15+
ceph-$(CONFIG_FS_ENCRYPTION) += crypto.o

fs/ceph/acl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ int ceph_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
140140
newattrs.ia_ctime = current_time(inode);
141141
newattrs.ia_mode = new_mode;
142142
newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
143-
ret = __ceph_setattr(inode, &newattrs);
143+
ret = __ceph_setattr(inode, &newattrs, NULL);
144144
if (ret)
145145
goto out_free;
146146
}
@@ -151,7 +151,7 @@ int ceph_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
151151
newattrs.ia_ctime = old_ctime;
152152
newattrs.ia_mode = old_mode;
153153
newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
154-
__ceph_setattr(inode, &newattrs);
154+
__ceph_setattr(inode, &newattrs, NULL);
155155
}
156156
goto out_free;
157157
}

0 commit comments

Comments
 (0)