From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Sage Weil <sage@newdream•net>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
Greg Farnum <gregf@hq•newdream.net>
Subject: linux-next: manual merge of the ceph tree with Linus' tree
Date: Thu, 23 Sep 2010 10:56:02 +1000 [thread overview]
Message-ID: <20100923105602.d5425e32.sfr@canb.auug.org.au> (raw)
Hi Sage,
Today's linux-next merge of the ceph tree got a conflict in
fs/ceph/mds_client.c between commit
3612abbd5df6baa9ca3e0777c6c8646e202d3f66 ("ceph: fix reconnect encoding
for old servers") from Linus' tree and commit
20d5970378f075f8f567b92bd2c16373fbe09b72 ("ceph: preallocate flock state
without locks held") from the ceph tree.
I fixed it up (I think - see below) and can carry the fix for a while.
--
Cheers,
Stephen Rothwell sfr@canb•auug.org.au
diff --cc fs/ceph/mds_client.c
index fad95f8,9c648ed..0000000
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@@ -2361,21 -2365,35 +2365,37 @@@ static int encode_caps_cb(struct inode
if (recon_state->flock) {
int num_fcntl_locks, num_flock_locks;
-
- lock_kernel();
- ceph_count_locks(inode, &num_fcntl_locks, &num_flock_locks);
- rec.v2.flock_len = (2*sizeof(u32) +
- (num_fcntl_locks+num_flock_locks) *
- sizeof(struct ceph_filelock));
-
- err = ceph_pagelist_append(pagelist, &rec, reclen);
- if (!err)
- err = ceph_encode_locks(inode, pagelist,
- num_fcntl_locks,
- num_flock_locks);
- unlock_kernel();
+ struct ceph_pagelist_cursor trunc_point;
+
+ ceph_pagelist_set_cursor(pagelist, &trunc_point);
+ do {
+ lock_kernel();
+ ceph_count_locks(inode, &num_fcntl_locks,
+ &num_flock_locks);
+ rec.v2.flock_len = (2*sizeof(u32) +
+ (num_fcntl_locks+num_flock_locks) *
+ sizeof(struct ceph_filelock));
+ unlock_kernel();
+
+ /* pre-alloc pagelist */
+ ceph_pagelist_truncate(pagelist, &trunc_point);
+ err = ceph_pagelist_append(pagelist, &rec, reclen);
+ if (!err)
+ err = ceph_pagelist_reserve(pagelist,
+ rec.v2.flock_len);
+
+ /* encode locks */
+ if (!err) {
+ lock_kernel();
+ err = ceph_encode_locks(inode,
+ pagelist,
+ num_fcntl_locks,
+ num_flock_locks);
+ unlock_kernel();
+ }
+ } while (err == -ENOSPC);
+ } else {
+ err = ceph_pagelist_append(pagelist, &rec, reclen);
}
out_free:
next reply other threads:[~2010-09-23 0:56 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-23 0:56 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-11-05 22:24 linux-next: manual merge of the ceph tree with Linus' tree Stephen Rothwell
2013-07-10 1:24 Stephen Rothwell
2013-07-10 3:57 ` Sage Weil
2013-06-19 1:22 Stephen Rothwell
2013-04-18 1:34 Stephen Rothwell
2012-07-31 1:58 Stephen Rothwell
2012-07-21 23:16 Stephen Rothwell
2012-05-22 1:45 Stephen Rothwell
2012-05-22 3:58 ` Sage Weil
2012-03-21 1:23 Stephen Rothwell
2012-01-11 1:27 Stephen Rothwell
2012-01-11 1:31 ` Al Viro
2012-01-11 1:35 ` Sage Weil
2012-01-11 1:49 ` Al Viro
2012-01-11 3:02 ` Stephen Rothwell
2012-01-11 2:10 ` Alex Elder
2010-12-15 0:14 Stephen Rothwell
2010-09-23 1:04 Stephen Rothwell
2010-09-23 0:29 Stephen Rothwell
2010-09-23 3:36 ` Sage Weil
2010-08-13 0:28 Stephen Rothwell
2010-05-14 0:07 Stephen Rothwell
2010-05-14 0:07 Stephen Rothwell
2010-05-14 0:07 Stephen Rothwell
2010-05-14 4:25 ` Sage Weil
2010-05-14 6:00 ` Stephen Rothwell
2010-01-12 0:09 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100923105602.d5425e32.sfr@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=gregf@hq$(echo .)newdream.net \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=sage@newdream$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox