dm.c (728d90bdc9e480dc93913e59a0aa3c896c7aa697) dm.c (2e2d6f7e44a2b9f96ca8af445ae0150a6cefde41)
1/*
2 * Copyright (C) 2001, 2002 Sistina Software (UK) Limited.
3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include "dm-core.h"

--- 1160 unchanged lines hidden (view full) ---

1169 out:
1170 dm_put_live_table(md, srcu_idx);
1171
1172 return ret;
1173}
1174
1175/*
1176 * A target may call dm_accept_partial_bio only from the map routine. It is
1/*
2 * Copyright (C) 2001, 2002 Sistina Software (UK) Limited.
3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include "dm-core.h"

--- 1160 unchanged lines hidden (view full) ---

1169 out:
1170 dm_put_live_table(md, srcu_idx);
1171
1172 return ret;
1173}
1174
1175/*
1176 * A target may call dm_accept_partial_bio only from the map routine. It is
1177 * allowed for all bio types except REQ_PREFLUSH and REQ_OP_ZONE_RESET.
1177 * allowed for all bio types except REQ_PREFLUSH, REQ_OP_ZONE_RESET,
1178 * REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH.
1178 *
1179 * dm_accept_partial_bio informs the dm that the target only wants to process
1180 * additional n_sectors sectors of the bio and the rest of the data should be
1181 * sent in a next bio.
1182 *
1183 * A diagram that explains the arithmetics:
1184 * +--------------------+---------------+-------+
1185 * | 1 | 2 | 3 |

--- 436 unchanged lines hidden (view full) ---

1622 * the basis for the clone(s).
1623 */
1624 bio_init(&flush_bio, NULL, 0);
1625 flush_bio.bi_opf = REQ_OP_WRITE | REQ_PREFLUSH | REQ_SYNC;
1626 ci.bio = &flush_bio;
1627 ci.sector_count = 0;
1628 error = __send_empty_flush(&ci);
1629 /* dec_pending submits any data associated with flush */
1179 *
1180 * dm_accept_partial_bio informs the dm that the target only wants to process
1181 * additional n_sectors sectors of the bio and the rest of the data should be
1182 * sent in a next bio.
1183 *
1184 * A diagram that explains the arithmetics:
1185 * +--------------------+---------------+-------+
1186 * | 1 | 2 | 3 |

--- 436 unchanged lines hidden (view full) ---

1623 * the basis for the clone(s).
1624 */
1625 bio_init(&flush_bio, NULL, 0);
1626 flush_bio.bi_opf = REQ_OP_WRITE | REQ_PREFLUSH | REQ_SYNC;
1627 ci.bio = &flush_bio;
1628 ci.sector_count = 0;
1629 error = __send_empty_flush(&ci);
1630 /* dec_pending submits any data associated with flush */
1630 } else if (bio_op(bio) == REQ_OP_ZONE_RESET) {
1631 } else if (op_is_zone_mgmt(bio_op(bio))) {
1631 ci.bio = bio;
1632 ci.sector_count = 0;
1633 error = __split_and_process_non_flush(&ci);
1634 } else {
1635 ci.bio = bio;
1636 ci.sector_count = bio_sectors(bio);
1637 while (ci.sector_count && !error) {
1638 error = __split_and_process_non_flush(&ci);

--- 1599 unchanged lines hidden ---
1632 ci.bio = bio;
1633 ci.sector_count = 0;
1634 error = __split_and_process_non_flush(&ci);
1635 } else {
1636 ci.bio = bio;
1637 ci.sector_count = bio_sectors(bio);
1638 while (ci.sector_count && !error) {
1639 error = __split_and_process_non_flush(&ci);

--- 1599 unchanged lines hidden ---