dm-table.c (ecdb2e257abc33ae6798d3ccba87bdafa40ef6b6) dm-table.c (8215d6ec5fee1e76545decea2cd73717efb5cb42)
1/*
2 * Copyright (C) 2001 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.h"

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

424 return 0;
425}
426
427/*
428 * Add a device to the list, or just increment the usage count if
429 * it's already present.
430 */
431static int __table_get_device(struct dm_table *t, struct dm_target *ti,
1/*
2 * Copyright (C) 2001 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.h"

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

424 return 0;
425}
426
427/*
428 * Add a device to the list, or just increment the usage count if
429 * it's already present.
430 */
431static int __table_get_device(struct dm_table *t, struct dm_target *ti,
432 const char *path, sector_t start, sector_t len,
433 fmode_t mode, struct dm_dev **result)
432 const char *path, fmode_t mode, struct dm_dev **result)
434{
435 int r;
436 dev_t uninitialized_var(dev);
437 struct dm_dev_internal *dd;
438 unsigned int major, minor;
439
440 BUG_ON(!t);
441

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

522 if (q->merge_bvec_fn && !ti->type->merge)
523 limits->max_sectors =
524 min_not_zero(limits->max_sectors,
525 (unsigned int) (PAGE_SIZE >> 9));
526 return 0;
527}
528EXPORT_SYMBOL_GPL(dm_set_device_limits);
529
433{
434 int r;
435 dev_t uninitialized_var(dev);
436 struct dm_dev_internal *dd;
437 unsigned int major, minor;
438
439 BUG_ON(!t);
440

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

521 if (q->merge_bvec_fn && !ti->type->merge)
522 limits->max_sectors =
523 min_not_zero(limits->max_sectors,
524 (unsigned int) (PAGE_SIZE >> 9));
525 return 0;
526}
527EXPORT_SYMBOL_GPL(dm_set_device_limits);
528
530int dm_get_device(struct dm_target *ti, const char *path, sector_t start,
531 sector_t len, fmode_t mode, struct dm_dev **result)
529int dm_get_device(struct dm_target *ti, const char *path, fmode_t mode,
530 struct dm_dev **result)
532{
531{
533 return __table_get_device(ti->table, ti, path,
534 start, len, mode, result);
532 return __table_get_device(ti->table, ti, path, mode, result);
535}
536
537
538/*
539 * Decrement a devices use count and remove it if necessary.
540 */
541void dm_put_device(struct dm_target *ti, struct dm_dev *d)
542{

--- 704 unchanged lines hidden ---
533}
534
535
536/*
537 * Decrement a devices use count and remove it if necessary.
538 */
539void dm_put_device(struct dm_target *ti, struct dm_dev *d)
540{

--- 704 unchanged lines hidden ---