Skip to content

Commit 682c30e

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (39 commits) ceph: generalize mon requests, add pool op support ceph: only queue async writeback on cap revocation if there is dirty data ceph: do not ignore osd_idle_ttl mount option ceph: constify dentry_operations ceph: whitespace cleanup ceph: add flock/fcntl lock support ceph: define on-wire types, constants for file locking support ceph: add CEPH_FEATURE_FLOCK to the supported feature bits ceph: support v2 reconnect encoding ceph: support v2 client_caps encoding ceph: move AES iv definition to shared header ceph: fix decoding of pool snap info ceph: make ->sync_fs not wait if wait==0 ceph: warn on missing snap realm ceph: print useful error message when crush rule not found ceph: use %pU to print uuid (fsid) ceph: sync header defs with server code ceph: clean up header guards ceph: strip misleading/obsolete version, feature info ceph: specify supported features in super.h ...
2 parents 84479f3 + e56fa10 commit 682c30e

39 files changed

+1162
-410
lines changed

fs/ceph/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ifneq ($(KERNELRELEASE),)
66

77
obj-$(CONFIG_CEPH_FS) += ceph.o
88

9-
ceph-objs := super.o inode.o dir.o file.o addr.o ioctl.o \
9+
ceph-objs := super.o inode.o dir.o file.o locks.o addr.o ioctl.o \
1010
export.o caps.o snap.o xattr.o \
1111
messenger.o msgpool.o buffer.o pagelist.o \
1212
mds_client.o mdsmap.o \

fs/ceph/addr.c

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ static int ceph_readpages(struct file *file, struct address_space *mapping,
309309
zero_user_segment(page, s, PAGE_CACHE_SIZE);
310310
}
311311

312-
if (add_to_page_cache_lru(page, mapping, page->index, GFP_NOFS)) {
312+
if (add_to_page_cache_lru(page, mapping, page->index,
313+
GFP_NOFS)) {
313314
page_cache_release(page);
314315
dout("readpages %p add_to_page_cache failed %p\n",
315316
inode, page);
@@ -552,7 +553,7 @@ static void writepages_finish(struct ceph_osd_request *req,
552553
* page truncation thread, possibly losing some data that
553554
* raced its way in
554555
*/
555-
if ((issued & CEPH_CAP_FILE_CACHE) == 0)
556+
if ((issued & (CEPH_CAP_FILE_CACHE|CEPH_CAP_FILE_LAZYIO)) == 0)
556557
generic_error_remove_page(inode->i_mapping, page);
557558

558559
unlock_page(page);
@@ -797,9 +798,12 @@ static int ceph_writepages_start(struct address_space *mapping,
797798
dout("%p will write page %p idx %lu\n",
798799
inode, page, page->index);
799800

800-
writeback_stat = atomic_long_inc_return(&client->writeback_count);
801-
if (writeback_stat > CONGESTION_ON_THRESH(client->mount_args->congestion_kb)) {
802-
set_bdi_congested(&client->backing_dev_info, BLK_RW_ASYNC);
801+
writeback_stat =
802+
atomic_long_inc_return(&client->writeback_count);
803+
if (writeback_stat > CONGESTION_ON_THRESH(
804+
client->mount_args->congestion_kb)) {
805+
set_bdi_congested(&client->backing_dev_info,
806+
BLK_RW_ASYNC);
803807
}
804808

805809
set_page_writeback(page);
@@ -1036,7 +1040,7 @@ static int ceph_write_begin(struct file *file, struct address_space *mapping,
10361040
*pagep = page;
10371041

10381042
dout("write_begin file %p inode %p page %p %d~%d\n", file,
1039-
inode, page, (int)pos, (int)len);
1043+
inode, page, (int)pos, (int)len);
10401044

10411045
r = ceph_update_writeable_page(file, pos, len, page);
10421046
} while (r == -EAGAIN);

fs/ceph/armor.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11

22
#include <linux/errno.h>
33

4+
int ceph_armor(char *dst, const char *src, const char *end);
5+
int ceph_unarmor(char *dst, const char *src, const char *end);
6+
47
/*
58
* base64 encode/decode.
69
*/
710

8-
const char *pem_key = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
11+
static const char *pem_key =
12+
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
913

1014
static int encode_bits(int c)
1115
{

fs/ceph/auth.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ static u32 supported_protocols[] = {
2020
CEPH_AUTH_CEPHX
2121
};
2222

23-
int ceph_auth_init_protocol(struct ceph_auth_client *ac, int protocol)
23+
static int ceph_auth_init_protocol(struct ceph_auth_client *ac, int protocol)
2424
{
2525
switch (protocol) {
2626
case CEPH_AUTH_NONE:
@@ -133,8 +133,8 @@ int ceph_auth_build_hello(struct ceph_auth_client *ac, void *buf, size_t len)
133133
return -ERANGE;
134134
}
135135

136-
int ceph_build_auth_request(struct ceph_auth_client *ac,
137-
void *msg_buf, size_t msg_len)
136+
static int ceph_build_auth_request(struct ceph_auth_client *ac,
137+
void *msg_buf, size_t msg_len)
138138
{
139139
struct ceph_mon_request_header *monhdr = msg_buf;
140140
void *p = monhdr + 1;

fs/ceph/auth_x.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ static int ceph_x_decrypt(struct ceph_crypto_key *secret,
8787
/*
8888
* get existing (or insert new) ticket handler
8989
*/
90-
struct ceph_x_ticket_handler *get_ticket_handler(struct ceph_auth_client *ac,
91-
int service)
90+
static struct ceph_x_ticket_handler *
91+
get_ticket_handler(struct ceph_auth_client *ac, int service)
9292
{
9393
struct ceph_x_ticket_handler *th;
9494
struct ceph_x_info *xi = ac->private;
@@ -429,7 +429,7 @@ static int ceph_x_build_request(struct ceph_auth_client *ac,
429429
auth->struct_v = 1;
430430
auth->key = 0;
431431
for (u = (u64 *)tmp_enc; u + 1 <= (u64 *)(tmp_enc + ret); u++)
432-
auth->key ^= *u;
432+
auth->key ^= *(__le64 *)u;
433433
dout(" server_challenge %llx client_challenge %llx key %llx\n",
434434
xi->server_challenge, le64_to_cpu(auth->client_challenge),
435435
le64_to_cpu(auth->key));

fs/ceph/buffer.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,6 @@ void ceph_buffer_release(struct kref *kref)
4747
kfree(b);
4848
}
4949

50-
int ceph_buffer_alloc(struct ceph_buffer *b, int len, gfp_t gfp)
51-
{
52-
b->vec.iov_base = kmalloc(len, gfp | __GFP_NOWARN);
53-
if (b->vec.iov_base) {
54-
b->is_vmalloc = false;
55-
} else {
56-
b->vec.iov_base = __vmalloc(len, gfp, PAGE_KERNEL);
57-
b->is_vmalloc = true;
58-
}
59-
if (!b->vec.iov_base)
60-
return -ENOMEM;
61-
b->alloc_len = len;
62-
b->vec.iov_len = len;
63-
return 0;
64-
}
65-
6650
int ceph_decode_buffer(struct ceph_buffer **b, void **p, void *end)
6751
{
6852
size_t len;

0 commit comments

Comments
 (0)