History

ceph: try to allocate a smaller extent map for sparse read

In fscrypt case and for a smaller read length we can predict the max count of the extent map. And for small read length use cases this could save some memories. [ idryomov: squash into a single patch to avoid build break, drop redundant variable in ceph_alloc_sparse_ext_map() ]

Xiubo Li committed 3 years ago

Commit aaefabc1 parent b79e4a04 files · +28 −5Browse files

Showing the changes to include/linux/ceph (1 of 4 files). Show all

Unified · Split

include/linux/ceph/osd_client.h+5−2
@@ -572,9 +572,12 @@ int __ceph_alloc_sparse_ext_map(struct ceph_osd_req_op *op, int cnt); · 571 unmodified lines
572572 */
573573 #define CEPH_SPARSE_EXT_ARRAY_INITIAL 16
574574
575−static inline int ceph_alloc_sparse_ext_map(struct ceph_osd_req_op *op)
575+static inline int ceph_alloc_sparse_ext_map(struct ceph_osd_req_op *op, int cnt)
576576 {
577− return __ceph_alloc_sparse_ext_map(op, CEPH_SPARSE_EXT_ARRAY_INITIAL);
577+ if (!cnt)
578+ cnt = CEPH_SPARSE_EXT_ARRAY_INITIAL;
579+
580+ return __ceph_alloc_sparse_ext_map(op, cnt);
578581 }
579582
580583 extern void ceph_osdc_get_request(struct ceph_osd_request *req);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t