Commit ef091b3c authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'ceph-for-4.9-rc5' of git://github.com/ceph/ceph-client

Pull Ceph fixes from Ilya Dryomov:
 "Ceph's ->read_iter() implementation is incompatible with the new
  generic_file_splice_read() code that went into -rc1.  Switch to the
  less efficient default_file_splice_read() for now; the proper fix is
  being held for 4.10.

  We also have a fix for a 4.8 regression and a trival libceph fixup"

* tag 'ceph-for-4.9-rc5' of git://github.com/ceph/ceph-client:
  libceph: initialize last_linger_id with a large integer
  libceph: fix legacy layout decode with pool 0
  ceph: use default file splice read callback
parents ef5beed9 264048af
...@@ -1770,7 +1770,6 @@ const struct file_operations ceph_file_fops = { ...@@ -1770,7 +1770,6 @@ const struct file_operations ceph_file_fops = {
.fsync = ceph_fsync, .fsync = ceph_fsync,
.lock = ceph_lock, .lock = ceph_lock,
.flock = ceph_flock, .flock = ceph_flock,
.splice_read = generic_file_splice_read,
.splice_write = iter_file_splice_write, .splice_write = iter_file_splice_write,
.unlocked_ioctl = ceph_ioctl, .unlocked_ioctl = ceph_ioctl,
.compat_ioctl = ceph_ioctl, .compat_ioctl = ceph_ioctl,
......
...@@ -258,6 +258,8 @@ struct ceph_watch_item { ...@@ -258,6 +258,8 @@ struct ceph_watch_item {
struct ceph_entity_addr addr; struct ceph_entity_addr addr;
}; };
#define CEPH_LINGER_ID_START 0xffff000000000000ULL
struct ceph_osd_client { struct ceph_osd_client {
struct ceph_client *client; struct ceph_client *client;
......
...@@ -34,7 +34,8 @@ void ceph_file_layout_from_legacy(struct ceph_file_layout *fl, ...@@ -34,7 +34,8 @@ void ceph_file_layout_from_legacy(struct ceph_file_layout *fl,
fl->stripe_count = le32_to_cpu(legacy->fl_stripe_count); fl->stripe_count = le32_to_cpu(legacy->fl_stripe_count);
fl->object_size = le32_to_cpu(legacy->fl_object_size); fl->object_size = le32_to_cpu(legacy->fl_object_size);
fl->pool_id = le32_to_cpu(legacy->fl_pg_pool); fl->pool_id = le32_to_cpu(legacy->fl_pg_pool);
if (fl->pool_id == 0) if (fl->pool_id == 0 && fl->stripe_unit == 0 &&
fl->stripe_count == 0 && fl->object_size == 0)
fl->pool_id = -1; fl->pool_id = -1;
} }
EXPORT_SYMBOL(ceph_file_layout_from_legacy); EXPORT_SYMBOL(ceph_file_layout_from_legacy);
......
...@@ -4094,6 +4094,7 @@ int ceph_osdc_init(struct ceph_osd_client *osdc, struct ceph_client *client) ...@@ -4094,6 +4094,7 @@ int ceph_osdc_init(struct ceph_osd_client *osdc, struct ceph_client *client)
osd_init(&osdc->homeless_osd); osd_init(&osdc->homeless_osd);
osdc->homeless_osd.o_osdc = osdc; osdc->homeless_osd.o_osdc = osdc;
osdc->homeless_osd.o_osd = CEPH_HOMELESS_OSD; osdc->homeless_osd.o_osd = CEPH_HOMELESS_OSD;
osdc->last_linger_id = CEPH_LINGER_ID_START;
osdc->linger_requests = RB_ROOT; osdc->linger_requests = RB_ROOT;
osdc->map_checks = RB_ROOT; osdc->map_checks = RB_ROOT;
osdc->linger_map_checks = RB_ROOT; osdc->linger_map_checks = RB_ROOT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment