/linux-4.1.27/drivers/video/fbdev/omap/ |
H A D | lcd_mipid.c | 68 static void mipid_transfer(struct mipid_device *md, int cmd, const u8 *wbuf, mipid_transfer() argument 76 BUG_ON(md->spi == NULL); mipid_transfer() 117 r = spi_sync(md->spi, &m); mipid_transfer() 119 dev_dbg(&md->spi->dev, "spi_sync %d\n", r); mipid_transfer() 125 static inline void mipid_cmd(struct mipid_device *md, int cmd) mipid_cmd() argument 127 mipid_transfer(md, cmd, NULL, 0, NULL, 0); mipid_cmd() 130 static inline void mipid_write(struct mipid_device *md, mipid_write() argument 133 mipid_transfer(md, reg, buf, len, NULL, 0); mipid_write() 136 static inline void mipid_read(struct mipid_device *md, mipid_read() argument 139 mipid_transfer(md, reg, NULL, 0, buf, len); mipid_read() 142 static void set_data_lines(struct mipid_device *md, int data_lines) set_data_lines() argument 157 mipid_write(md, 0x3a, (u8 *)&par, 2); set_data_lines() 160 static void send_init_string(struct mipid_device *md) send_init_string() argument 164 mipid_write(md, 0xc2, (u8 *)initpar, sizeof(initpar)); send_init_string() 165 set_data_lines(md, md->panel.data_lines); send_init_string() 168 static void hw_guard_start(struct mipid_device *md, int guard_msec) hw_guard_start() argument 170 md->hw_guard_wait = msecs_to_jiffies(guard_msec); hw_guard_start() 171 md->hw_guard_end = jiffies + md->hw_guard_wait; hw_guard_start() 174 static void hw_guard_wait(struct mipid_device *md) hw_guard_wait() argument 176 unsigned long wait = md->hw_guard_end - jiffies; hw_guard_wait() 178 if ((long)wait > 0 && wait <= md->hw_guard_wait) { hw_guard_wait() 184 static void set_sleep_mode(struct mipid_device *md, int on) set_sleep_mode() argument 192 hw_guard_wait(md); set_sleep_mode() 193 mipid_cmd(md, cmd); set_sleep_mode() 194 hw_guard_start(md, 120); set_sleep_mode() 206 static void set_display_state(struct mipid_device *md, int enabled) set_display_state() argument 210 mipid_cmd(md, cmd); set_display_state() 215 struct mipid_device *md = to_mipid_device(panel); mipid_set_bklight_level() local 216 struct mipid_platform_data *pd = md->spi->dev.platform_data; mipid_set_bklight_level() 222 if (!md->enabled) { mipid_set_bklight_level() 223 md->saved_bklight_level = level; mipid_set_bklight_level() 233 struct mipid_device *md = to_mipid_device(panel); mipid_get_bklight_level() local 234 struct mipid_platform_data *pd = md->spi->dev.platform_data; mipid_get_bklight_level() 243 struct mipid_device *md = to_mipid_device(panel); mipid_get_bklight_max() local 244 struct mipid_platform_data *pd = md->spi->dev.platform_data; mipid_get_bklight_max() 257 static u16 read_first_pixel(struct mipid_device *md) read_first_pixel() argument 262 mutex_lock(&md->mutex); read_first_pixel() 263 mipid_read(md, MIPID_CMD_READ_RED, &red, 1); read_first_pixel() 264 mipid_read(md, MIPID_CMD_READ_GREEN, &green, 1); read_first_pixel() 265 mipid_read(md, MIPID_CMD_READ_BLUE, &blue, 1); read_first_pixel() 266 mutex_unlock(&md->mutex); read_first_pixel() 268 switch (md->panel.data_lines) { read_first_pixel() 287 struct mipid_device *md = to_mipid_device(panel); mipid_run_test() local 300 omapfb_write_first_pixel(md->fbdev, test_values[i]); mipid_run_test() 307 pixel = read_first_pixel(md); mipid_run_test() 311 dev_err(&md->spi->dev, mipid_run_test() 324 static void ls041y3_esd_recover(struct mipid_device *md) ls041y3_esd_recover() argument 326 dev_err(&md->spi->dev, "performing LCD ESD recovery\n"); ls041y3_esd_recover() 327 set_sleep_mode(md, 1); ls041y3_esd_recover() 328 set_sleep_mode(md, 0); ls041y3_esd_recover() 331 static void ls041y3_esd_check_mode1(struct mipid_device *md) ls041y3_esd_check_mode1() argument 335 mipid_read(md, MIPID_CMD_RDDSDR, &state1, 1); ls041y3_esd_check_mode1() 336 set_sleep_mode(md, 0); ls041y3_esd_check_mode1() 337 mipid_read(md, MIPID_CMD_RDDSDR, &state2, 1); ls041y3_esd_check_mode1() 338 dev_dbg(&md->spi->dev, "ESD mode 1 state1 %02x state2 %02x\n", ls041y3_esd_check_mode1() 344 ls041y3_esd_recover(md); ls041y3_esd_check_mode1() 347 static void ls041y3_esd_check_mode2(struct mipid_device *md) ls041y3_esd_check_mode2() argument 367 mipid_write(md, rd->cmd, (u8 *)rd->wbuf, rd->wlen); ls041y3_esd_check_mode2() 370 mipid_read(md, rd->cmd, rbuf, 2); ls041y3_esd_check_mode2() 375 mipid_write(md, rd->cmd, (u8 *)rd->wbuf, rd->wlen); ls041y3_esd_check_mode2() 378 dev_dbg(&md->spi->dev, "ESD mode 2 state %02x\n", rbuf[1]); ls041y3_esd_check_mode2() 380 ls041y3_esd_recover(md); ls041y3_esd_check_mode2() 383 static void ls041y3_esd_check(struct mipid_device *md) ls041y3_esd_check() argument 385 ls041y3_esd_check_mode1(md); ls041y3_esd_check() 386 if (md->revision >= 0x88) ls041y3_esd_check() 387 ls041y3_esd_check_mode2(md); ls041y3_esd_check() 390 static void mipid_esd_start_check(struct mipid_device *md) mipid_esd_start_check() argument 392 if (md->esd_check != NULL) mipid_esd_start_check() 393 queue_delayed_work(md->esd_wq, &md->esd_work, mipid_esd_start_check() 397 static void mipid_esd_stop_check(struct mipid_device *md) mipid_esd_stop_check() argument 399 if (md->esd_check != NULL) mipid_esd_stop_check() 400 cancel_delayed_work_sync(&md->esd_work); mipid_esd_stop_check() 405 struct mipid_device *md = container_of(work, struct mipid_device, mipid_esd_work() local 408 mutex_lock(&md->mutex); mipid_esd_work() 409 md->esd_check(md); mipid_esd_work() 410 mutex_unlock(&md->mutex); mipid_esd_work() 411 mipid_esd_start_check(md); mipid_esd_work() 416 struct mipid_device *md = to_mipid_device(panel); mipid_enable() local 418 mutex_lock(&md->mutex); mipid_enable() 420 if (md->enabled) { mipid_enable() 421 mutex_unlock(&md->mutex); mipid_enable() 424 set_sleep_mode(md, 0); mipid_enable() 425 md->enabled = 1; mipid_enable() 426 send_init_string(md); mipid_enable() 427 set_display_state(md, 1); mipid_enable() 428 mipid_set_bklight_level(panel, md->saved_bklight_level); mipid_enable() 429 mipid_esd_start_check(md); mipid_enable() 431 mutex_unlock(&md->mutex); mipid_enable() 437 struct mipid_device *md = to_mipid_device(panel); mipid_disable() local 443 mipid_esd_stop_check(md); mipid_disable() 444 mutex_lock(&md->mutex); mipid_disable() 446 if (!md->enabled) { mipid_disable() 447 mutex_unlock(&md->mutex); mipid_disable() 450 md->saved_bklight_level = mipid_get_bklight_level(panel); mipid_disable() 452 set_display_state(md, 0); mipid_disable() 453 set_sleep_mode(md, 1); mipid_disable() 454 md->enabled = 0; mipid_disable() 456 mutex_unlock(&md->mutex); mipid_disable() 459 static int panel_enabled(struct mipid_device *md) panel_enabled() argument 464 mipid_read(md, MIPID_CMD_READ_DISP_STATUS, (u8 *)&disp_status, 4); panel_enabled() 467 dev_dbg(&md->spi->dev, panel_enabled() 476 struct mipid_device *md = to_mipid_device(panel); mipid_init() local 478 md->fbdev = fbdev; mipid_init() 479 md->esd_wq = create_singlethread_workqueue("mipid_esd"); mipid_init() 480 if (md->esd_wq == NULL) { mipid_init() 481 dev_err(&md->spi->dev, "can't create ESD workqueue\n"); mipid_init() 484 INIT_DELAYED_WORK(&md->esd_work, mipid_esd_work); mipid_init() 485 mutex_init(&md->mutex); mipid_init() 487 md->enabled = panel_enabled(md); mipid_init() 489 if (md->enabled) mipid_init() 490 mipid_esd_start_check(md); mipid_init() 492 md->saved_bklight_level = mipid_get_bklight_level(panel); mipid_init() 499 struct mipid_device *md = to_mipid_device(panel); mipid_cleanup() local 501 if (md->enabled) mipid_cleanup() 502 mipid_esd_stop_check(md); mipid_cleanup() 503 destroy_workqueue(md->esd_wq); mipid_cleanup() 531 static int mipid_detect(struct mipid_device *md) mipid_detect() argument 536 pdata = md->spi->dev.platform_data; mipid_detect() 538 dev_err(&md->spi->dev, "missing platform data\n"); mipid_detect() 542 mipid_read(md, MIPID_CMD_READ_DISP_ID, display_id, 3); mipid_detect() 543 dev_dbg(&md->spi->dev, "MIPI display ID: %02x%02x%02x\n", mipid_detect() 548 md->panel.name = "lph8923"; mipid_detect() 551 md->panel.name = "ls041y3"; mipid_detect() 552 md->esd_check = ls041y3_esd_check; mipid_detect() 555 md->panel.name = "unknown"; mipid_detect() 556 dev_err(&md->spi->dev, "invalid display ID\n"); mipid_detect() 560 md->revision = display_id[1]; mipid_detect() 561 md->panel.data_lines = pdata->data_lines; mipid_detect() 563 md->panel.name, md->revision, md->panel.data_lines); mipid_detect() 570 struct mipid_device *md; mipid_spi_probe() local 573 md = kzalloc(sizeof(*md), GFP_KERNEL); mipid_spi_probe() 574 if (md == NULL) { mipid_spi_probe() 580 md->spi = spi; mipid_spi_probe() 581 dev_set_drvdata(&spi->dev, md); mipid_spi_probe() 582 md->panel = mipid_panel; mipid_spi_probe() 584 r = mipid_detect(md); mipid_spi_probe() 588 omapfb_register_panel(&md->panel); mipid_spi_probe() 595 struct mipid_device *md = dev_get_drvdata(&spi->dev); mipid_spi_remove() local 597 mipid_disable(&md->panel); mipid_spi_remove() 598 kfree(md); mipid_spi_remove()
|
/linux-4.1.27/drivers/md/ |
H A D | dm.c | 69 struct mapped_device *md; member in struct:dm_io 83 struct mapped_device *md; member in struct:dm_rq_target_io 116 * Bits for the md->flags field. 240 bool dm_use_blk_mq(struct mapped_device *md) dm_use_blk_mq() argument 242 return md->use_blk_mq; dm_use_blk_mq() 437 int dm_deleting_md(struct mapped_device *md) dm_deleting_md() argument 439 return test_bit(DMF_DELETING, &md->flags); dm_deleting_md() 444 struct mapped_device *md; dm_blk_open() local 448 md = bdev->bd_disk->private_data; dm_blk_open() 449 if (!md) dm_blk_open() 452 if (test_bit(DMF_FREEING, &md->flags) || dm_blk_open() 453 dm_deleting_md(md)) { dm_blk_open() 454 md = NULL; dm_blk_open() 458 dm_get(md); dm_blk_open() 459 atomic_inc(&md->open_count); dm_blk_open() 463 return md ? 0 : -ENXIO; dm_blk_open() 468 struct mapped_device *md; dm_blk_close() local 472 md = disk->private_data; dm_blk_close() 473 if (WARN_ON(!md)) dm_blk_close() 476 if (atomic_dec_and_test(&md->open_count) && dm_blk_close() 477 (test_bit(DMF_DEFERRED_REMOVE, &md->flags))) dm_blk_close() 480 dm_put(md); dm_blk_close() 485 int dm_open_count(struct mapped_device *md) dm_open_count() argument 487 return atomic_read(&md->open_count); dm_open_count() 493 int dm_lock_for_deletion(struct mapped_device *md, bool mark_deferred, bool only_deferred) dm_lock_for_deletion() argument 499 if (dm_open_count(md)) { dm_lock_for_deletion() 502 set_bit(DMF_DEFERRED_REMOVE, &md->flags); dm_lock_for_deletion() 503 } else if (only_deferred && !test_bit(DMF_DEFERRED_REMOVE, &md->flags)) dm_lock_for_deletion() 506 set_bit(DMF_DELETING, &md->flags); dm_lock_for_deletion() 513 int dm_cancel_deferred_remove(struct mapped_device *md) dm_cancel_deferred_remove() argument 519 if (test_bit(DMF_DELETING, &md->flags)) dm_cancel_deferred_remove() 522 clear_bit(DMF_DEFERRED_REMOVE, &md->flags); dm_cancel_deferred_remove() 534 sector_t dm_get_size(struct mapped_device *md) dm_get_size() argument 536 return get_capacity(md->disk); dm_get_size() 539 struct request_queue *dm_get_md_queue(struct mapped_device *md) dm_get_md_queue() argument 541 return md->queue; dm_get_md_queue() 544 struct dm_stats *dm_get_stats(struct mapped_device *md) dm_get_stats() argument 546 return &md->stats; dm_get_stats() 551 struct mapped_device *md = bdev->bd_disk->private_data; dm_blk_getgeo() local 553 return dm_get_geometry(md, geo); dm_blk_getgeo() 559 struct mapped_device *md = bdev->bd_disk->private_data; dm_blk_ioctl() local 566 map = dm_get_live_table(md, &srcu_idx); dm_blk_ioctl() 579 if (dm_suspended_md(md)) { dm_blk_ioctl() 587 dm_put_live_table(md, srcu_idx); dm_blk_ioctl() 597 static struct dm_io *alloc_io(struct mapped_device *md) alloc_io() argument 599 return mempool_alloc(md->io_pool, GFP_NOIO); alloc_io() 602 static void free_io(struct mapped_device *md, struct dm_io *io) free_io() argument 604 mempool_free(io, md->io_pool); free_io() 607 static void free_tio(struct mapped_device *md, struct dm_target_io *tio) free_tio() argument 612 static struct dm_rq_target_io *alloc_rq_tio(struct mapped_device *md, alloc_rq_tio() argument 615 return mempool_alloc(md->io_pool, gfp_mask); alloc_rq_tio() 620 mempool_free(tio, tio->md->io_pool); free_rq_tio() 623 static struct request *alloc_clone_request(struct mapped_device *md, alloc_clone_request() argument 626 return mempool_alloc(md->rq_pool, gfp_mask); alloc_clone_request() 629 static void free_clone_request(struct mapped_device *md, struct request *rq) free_clone_request() argument 631 mempool_free(rq, md->rq_pool); free_clone_request() 634 static int md_in_flight(struct mapped_device *md) md_in_flight() argument 636 return atomic_read(&md->pending[READ]) + md_in_flight() 637 atomic_read(&md->pending[WRITE]); md_in_flight() 642 struct mapped_device *md = io->md; start_io_acct() local 650 part_round_stats(cpu, &dm_disk(md)->part0); start_io_acct() 652 atomic_set(&dm_disk(md)->part0.in_flight[rw], start_io_acct() 653 atomic_inc_return(&md->pending[rw])); start_io_acct() 655 if (unlikely(dm_stats_used(&md->stats))) start_io_acct() 656 dm_stats_account_io(&md->stats, bio->bi_rw, bio->bi_iter.bi_sector, start_io_acct() 662 struct mapped_device *md = io->md; end_io_acct() local 668 generic_end_io_acct(rw, &dm_disk(md)->part0, io->start_time); end_io_acct() 670 if (unlikely(dm_stats_used(&md->stats))) end_io_acct() 671 dm_stats_account_io(&md->stats, bio->bi_rw, bio->bi_iter.bi_sector, end_io_acct() 678 pending = atomic_dec_return(&md->pending[rw]); end_io_acct() 679 atomic_set(&dm_disk(md)->part0.in_flight[rw], pending); end_io_acct() 680 pending += atomic_read(&md->pending[rw^0x1]); end_io_acct() 684 wake_up(&md->wait); end_io_acct() 690 static void queue_io(struct mapped_device *md, struct bio *bio) queue_io() argument 694 spin_lock_irqsave(&md->deferred_lock, flags); queue_io() 695 bio_list_add(&md->deferred, bio); queue_io() 696 spin_unlock_irqrestore(&md->deferred_lock, flags); queue_io() 697 queue_work(md->wq, &md->work); queue_io() 702 * function to access the md->map field, and make sure they call 705 struct dm_table *dm_get_live_table(struct mapped_device *md, int *srcu_idx) __acquires(md->io_barrier) 707 *srcu_idx = srcu_read_lock(&md->io_barrier); 709 return srcu_dereference(md->map, &md->io_barrier); 712 void dm_put_live_table(struct mapped_device *md, int srcu_idx) __releases(md->io_barrier) 714 srcu_read_unlock(&md->io_barrier, srcu_idx); 717 void dm_sync_table(struct mapped_device *md) dm_sync_table() argument 719 synchronize_srcu(&md->io_barrier); dm_sync_table() 727 static struct dm_table *dm_get_live_table_fast(struct mapped_device *md) __acquires(RCU) __acquires() 730 return rcu_dereference(md->map); __acquires() 733 static void dm_put_live_table_fast(struct mapped_device *md) __releases(RCU) __releases() 742 struct mapped_device *md) open_table_device() 755 r = bd_link_disk_holder(bdev, dm_disk(md)); open_table_device() 768 static void close_table_device(struct table_device *td, struct mapped_device *md) close_table_device() argument 773 bd_unlink_disk_holder(td->dm_dev.bdev, dm_disk(md)); close_table_device() 789 int dm_get_table_device(struct mapped_device *md, dev_t dev, fmode_t mode, dm_get_table_device() argument 794 mutex_lock(&md->table_devices_lock); dm_get_table_device() 795 td = find_table_device(&md->table_devices, dev, mode); dm_get_table_device() 799 mutex_unlock(&md->table_devices_lock); dm_get_table_device() 806 if ((r = open_table_device(td, dev, md))) { dm_get_table_device() 807 mutex_unlock(&md->table_devices_lock); dm_get_table_device() 815 list_add(&td->list, &md->table_devices); dm_get_table_device() 818 mutex_unlock(&md->table_devices_lock); dm_get_table_device() 825 void dm_put_table_device(struct mapped_device *md, struct dm_dev *d) dm_put_table_device() argument 829 mutex_lock(&md->table_devices_lock); dm_put_table_device() 831 close_table_device(td, md); dm_put_table_device() 835 mutex_unlock(&md->table_devices_lock); dm_put_table_device() 855 int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo) dm_get_geometry() argument 857 *geo = md->geometry; dm_get_geometry() 865 int dm_set_geometry(struct mapped_device *md, struct hd_geometry *geo) dm_set_geometry() argument 874 md->geometry = *geo; dm_set_geometry() 888 static int __noflush_suspending(struct mapped_device *md) __noflush_suspending() argument 890 return test_bit(DMF_NOFLUSH_SUSPENDING, &md->flags); __noflush_suspending() 902 struct mapped_device *md = io->md; dec_pending() local 907 if (!(io->error > 0 && __noflush_suspending(md))) dec_pending() 917 spin_lock_irqsave(&md->deferred_lock, flags); dec_pending() 918 if (__noflush_suspending(md)) dec_pending() 919 bio_list_add_head(&md->deferred, io->bio); dec_pending() 923 spin_unlock_irqrestore(&md->deferred_lock, flags); dec_pending() 929 free_io(md, io); dec_pending() 940 queue_io(md, bio); dec_pending() 943 trace_block_bio_complete(md->queue, bio, io_error); dec_pending() 949 static void disable_write_same(struct mapped_device *md) disable_write_same() argument 951 struct queue_limits *limits = dm_get_queue_limits(md); disable_write_same() 962 struct mapped_device *md = tio->io->md; clone_endio() local 987 disable_write_same(md); clone_endio() 989 free_tio(md, tio); clone_endio() 1050 * Don't touch any member of the md after calling this function because 1051 * the md may be freed in dm_put() at the end of this function. 1054 static void rq_completed(struct mapped_device *md, int rw, bool run_queue) rq_completed() argument 1056 atomic_dec(&md->pending[rw]); rq_completed() 1059 if (!md_in_flight(md)) rq_completed() 1060 wake_up(&md->wait); rq_completed() 1068 if (!md->queue->mq_ops && run_queue) rq_completed() 1069 blk_run_queue_async(md->queue); rq_completed() 1074 dm_put(md); rq_completed() 1080 struct mapped_device *md = tio->md; free_rq_clone() local 1084 if (md->type == DM_TYPE_MQ_REQUEST_BASED) free_rq_clone() 1087 else if (!md->queue->mq_ops) free_rq_clone() 1089 free_clone_request(md, clone); free_rq_clone() 1096 if (!md->queue->mq_ops) free_rq_clone() 1109 struct mapped_device *md = tio->md; dm_end_request() local 1130 rq_completed(md, rw, true); dm_end_request() 1145 else if (!tio->md->queue->mq_ops) dm_unprep_request() 1163 static void dm_requeue_unmapped_original_request(struct mapped_device *md, dm_requeue_unmapped_original_request() argument 1177 rq_completed(md, rw, false); dm_requeue_unmapped_original_request() 1184 dm_requeue_unmapped_original_request(tio->md, tio->orig); dm_requeue_unmapped_request() 1240 disable_write_same(tio->md); dm_done() 1271 rq_completed(tio->md, rw, false); dm_softirq_done() 1275 rq_completed(tio->md, rw, false); dm_softirq_done() 1434 struct mapped_device *md; __map_bio() local 1457 md = tio->io->md; __map_bio() 1459 free_tio(md, tio); __map_bio() 1467 struct mapped_device *md; member in struct:clone_info 1508 clone = bio_alloc_bioset(GFP_NOIO, 0, ci->md->bs); alloc_tio() 1674 static void __split_and_process_bio(struct mapped_device *md, __split_and_process_bio() argument 1686 ci.md = md; __split_and_process_bio() 1687 ci.io = alloc_io(md); __split_and_process_bio() 1691 ci.io->md = md; __split_and_process_bio() 1698 ci.bio = &ci.md->flush_bio; __split_and_process_bio() 1720 struct mapped_device *md = q->queuedata; dm_merge_bvec() local 1721 struct dm_table *map = dm_get_live_table_fast(md); dm_merge_bvec() 1760 dm_put_live_table_fast(md); dm_merge_bvec() 1777 struct mapped_device *md = q->queuedata; dm_make_request() local 1781 map = dm_get_live_table(md, &srcu_idx); dm_make_request() 1783 generic_start_io_acct(rw, bio_sectors(bio), &dm_disk(md)->part0); dm_make_request() 1786 if (unlikely(test_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags))) { dm_make_request() 1787 dm_put_live_table(md, srcu_idx); dm_make_request() 1790 queue_io(md, bio); dm_make_request() 1796 __split_and_process_bio(md, map, bio); dm_make_request() 1797 dm_put_live_table(md, srcu_idx); dm_make_request() 1801 int dm_request_based(struct mapped_device *md) dm_request_based() argument 1803 return blk_queue_stackable(md->queue); dm_request_based() 1839 r = blk_rq_prep_clone(clone, rq, tio->md->bs, gfp_mask, setup_clone() 1855 static struct request *clone_rq(struct request *rq, struct mapped_device *md, clone_rq() argument 1866 clone = alloc_clone_request(md, gfp_mask); clone_rq() 1876 free_clone_request(md, clone); clone_rq() 1886 struct mapped_device *md) init_tio() 1888 tio->md = md; init_tio() 1894 if (md->kworker_task) init_tio() 1899 struct mapped_device *md, gfp_t gfp_mask) prep_tio() 1905 tio = alloc_rq_tio(md, gfp_mask); prep_tio() 1909 init_tio(tio, rq, md); prep_tio() 1911 table = dm_get_live_table(md, &srcu_idx); prep_tio() 1913 if (!clone_rq(rq, md, tio, gfp_mask)) { prep_tio() 1914 dm_put_live_table(md, srcu_idx); prep_tio() 1919 dm_put_live_table(md, srcu_idx); prep_tio() 1929 struct mapped_device *md = q->queuedata; dm_prep_fn() local 1937 tio = prep_tio(rq, md, GFP_ATOMIC); dm_prep_fn() 1954 struct mapped_device *md) map_request() 1985 trace_block_rq_remap(clone->q, clone, disk_devt(dm_disk(md)), map_request() 2011 struct mapped_device *md = tio->md; map_tio_request() local 2013 if (map_request(tio, rq, md) == DM_MAPIO_REQUEUE) map_tio_request() 2014 dm_requeue_unmapped_original_request(md, rq); map_tio_request() 2017 static void dm_start_request(struct mapped_device *md, struct request *orig) dm_start_request() argument 2023 atomic_inc(&md->pending[rq_data_dir(orig)]); dm_start_request() 2025 if (md->seq_rq_merge_deadline_usecs) { dm_start_request() 2026 md->last_rq_pos = rq_end_sector(orig); dm_start_request() 2027 md->last_rq_rw = rq_data_dir(orig); dm_start_request() 2028 md->last_rq_start_time = ktime_get(); dm_start_request() 2032 * Hold the md reference here for the in-flight I/O. dm_start_request() 2038 dm_get(md); dm_start_request() 2043 ssize_t dm_attr_rq_based_seq_io_merge_deadline_show(struct mapped_device *md, char *buf) dm_attr_rq_based_seq_io_merge_deadline_show() argument 2045 return sprintf(buf, "%u\n", md->seq_rq_merge_deadline_usecs); dm_attr_rq_based_seq_io_merge_deadline_show() 2048 ssize_t dm_attr_rq_based_seq_io_merge_deadline_store(struct mapped_device *md, dm_attr_rq_based_seq_io_merge_deadline_store() argument 2053 if (!dm_request_based(md) || md->use_blk_mq) dm_attr_rq_based_seq_io_merge_deadline_store() 2062 md->seq_rq_merge_deadline_usecs = deadline; dm_attr_rq_based_seq_io_merge_deadline_store() 2067 static bool dm_request_peeked_before_merge_deadline(struct mapped_device *md) dm_request_peeked_before_merge_deadline() argument 2071 if (!md->seq_rq_merge_deadline_usecs) dm_request_peeked_before_merge_deadline() 2074 kt_deadline = ns_to_ktime((u64)md->seq_rq_merge_deadline_usecs * NSEC_PER_USEC); dm_request_peeked_before_merge_deadline() 2075 kt_deadline = ktime_add_safe(md->last_rq_start_time, kt_deadline); dm_request_peeked_before_merge_deadline() 2086 struct mapped_device *md = q->queuedata; dm_request_fn() local 2088 struct dm_table *map = dm_get_live_table(md, &srcu_idx); dm_request_fn() 2117 dm_start_request(md, rq); dm_request_fn() 2122 if (dm_request_peeked_before_merge_deadline(md) && dm_request_fn() 2123 md_in_flight(md) && rq->bio && rq->bio->bi_vcnt == 1 && dm_request_fn() 2124 md->last_rq_pos == pos && md->last_rq_rw == rq_data_dir(rq)) dm_request_fn() 2130 dm_start_request(md, rq); dm_request_fn() 2135 queue_kthread_work(&md->kworker, &tio->work); dm_request_fn() 2144 dm_put_live_table(md, srcu_idx); dm_request_fn() 2150 struct mapped_device *md = congested_data; dm_any_congested() local 2153 if (!test_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags)) { dm_any_congested() 2154 map = dm_get_live_table_fast(md); dm_any_congested() 2160 if (dm_request_based(md)) dm_any_congested() 2161 r = md->queue->backing_dev_info.state & dm_any_congested() 2166 dm_put_live_table_fast(md); dm_any_congested() 2225 static void dm_init_md_queue(struct mapped_device *md) dm_init_md_queue() argument 2236 queue_flag_clear_unlocked(QUEUE_FLAG_STACKABLE, md->queue); dm_init_md_queue() 2239 static void dm_init_old_md_queue(struct mapped_device *md) dm_init_old_md_queue() argument 2241 md->use_blk_mq = false; dm_init_old_md_queue() 2242 dm_init_md_queue(md); dm_init_old_md_queue() 2247 md->queue->queuedata = md; dm_init_old_md_queue() 2248 md->queue->backing_dev_info.congested_fn = dm_any_congested; dm_init_old_md_queue() 2249 md->queue->backing_dev_info.congested_data = md; dm_init_old_md_queue() 2251 blk_queue_bounce_limit(md->queue, BLK_BOUNCE_ANY); dm_init_old_md_queue() 2260 struct mapped_device *md = kzalloc(sizeof(*md), GFP_KERNEL); alloc_dev() local 2263 if (!md) { alloc_dev() 2279 r = init_srcu_struct(&md->io_barrier); alloc_dev() 2283 md->use_blk_mq = use_blk_mq; alloc_dev() 2284 md->type = DM_TYPE_NONE; alloc_dev() 2285 mutex_init(&md->suspend_lock); alloc_dev() 2286 mutex_init(&md->type_lock); alloc_dev() 2287 mutex_init(&md->table_devices_lock); alloc_dev() 2288 spin_lock_init(&md->deferred_lock); alloc_dev() 2289 atomic_set(&md->holders, 1); alloc_dev() 2290 atomic_set(&md->open_count, 0); alloc_dev() 2291 atomic_set(&md->event_nr, 0); alloc_dev() 2292 atomic_set(&md->uevent_seq, 0); alloc_dev() 2293 INIT_LIST_HEAD(&md->uevent_list); alloc_dev() 2294 INIT_LIST_HEAD(&md->table_devices); alloc_dev() 2295 spin_lock_init(&md->uevent_lock); alloc_dev() 2297 md->queue = blk_alloc_queue(GFP_KERNEL); alloc_dev() 2298 if (!md->queue) alloc_dev() 2301 dm_init_md_queue(md); alloc_dev() 2303 md->disk = alloc_disk(1); alloc_dev() 2304 if (!md->disk) alloc_dev() 2307 atomic_set(&md->pending[0], 0); alloc_dev() 2308 atomic_set(&md->pending[1], 0); alloc_dev() 2309 init_waitqueue_head(&md->wait); alloc_dev() 2310 INIT_WORK(&md->work, dm_wq_work); alloc_dev() 2311 init_waitqueue_head(&md->eventq); alloc_dev() 2312 init_completion(&md->kobj_holder.completion); alloc_dev() 2313 md->kworker_task = NULL; alloc_dev() 2315 md->disk->major = _major; alloc_dev() 2316 md->disk->first_minor = minor; alloc_dev() 2317 md->disk->fops = &dm_blk_dops; alloc_dev() 2318 md->disk->queue = md->queue; alloc_dev() 2319 md->disk->private_data = md; alloc_dev() 2320 sprintf(md->disk->disk_name, "dm-%d", minor); alloc_dev() 2321 add_disk(md->disk); alloc_dev() 2322 format_dev_t(md->name, MKDEV(_major, minor)); alloc_dev() 2324 md->wq = alloc_workqueue("kdmflush", WQ_MEM_RECLAIM, 0); alloc_dev() 2325 if (!md->wq) alloc_dev() 2328 md->bdev = bdget_disk(md->disk, 0); alloc_dev() 2329 if (!md->bdev) alloc_dev() 2332 bio_init(&md->flush_bio); alloc_dev() 2333 md->flush_bio.bi_bdev = md->bdev; alloc_dev() 2334 md->flush_bio.bi_rw = WRITE_FLUSH; alloc_dev() 2336 dm_stats_init(&md->stats); alloc_dev() 2340 old_md = idr_replace(&_minor_idr, md, minor); alloc_dev() 2345 return md; alloc_dev() 2348 destroy_workqueue(md->wq); alloc_dev() 2350 del_gendisk(md->disk); alloc_dev() 2351 put_disk(md->disk); alloc_dev() 2353 blk_cleanup_queue(md->queue); alloc_dev() 2355 cleanup_srcu_struct(&md->io_barrier); alloc_dev() 2361 kfree(md); alloc_dev() 2365 static void unlock_fs(struct mapped_device *md); 2367 static void free_dev(struct mapped_device *md) free_dev() argument 2369 int minor = MINOR(disk_devt(md->disk)); free_dev() 2371 unlock_fs(md); free_dev() 2372 destroy_workqueue(md->wq); free_dev() 2374 if (md->kworker_task) free_dev() 2375 kthread_stop(md->kworker_task); free_dev() 2376 if (md->io_pool) free_dev() 2377 mempool_destroy(md->io_pool); free_dev() 2378 if (md->rq_pool) free_dev() 2379 mempool_destroy(md->rq_pool); free_dev() 2380 if (md->bs) free_dev() 2381 bioset_free(md->bs); free_dev() 2383 cleanup_srcu_struct(&md->io_barrier); free_dev() 2384 free_table_devices(&md->table_devices); free_dev() 2385 dm_stats_cleanup(&md->stats); free_dev() 2388 md->disk->private_data = NULL; free_dev() 2390 if (blk_get_integrity(md->disk)) free_dev() 2391 blk_integrity_unregister(md->disk); free_dev() 2392 del_gendisk(md->disk); free_dev() 2393 put_disk(md->disk); free_dev() 2394 blk_cleanup_queue(md->queue); free_dev() 2395 if (md->use_blk_mq) free_dev() 2396 blk_mq_free_tag_set(&md->tag_set); free_dev() 2397 bdput(md->bdev); free_dev() 2401 kfree(md); free_dev() 2404 static void __bind_mempools(struct mapped_device *md, struct dm_table *t) __bind_mempools() argument 2408 if (md->bs) { __bind_mempools() 2409 /* The md already has necessary mempools. */ __bind_mempools() 2415 bioset_free(md->bs); __bind_mempools() 2416 md->bs = p->bs; __bind_mempools() 2430 BUG_ON(!p || md->io_pool || md->rq_pool || md->bs); __bind_mempools() 2432 md->io_pool = p->io_pool; __bind_mempools() 2434 md->rq_pool = p->rq_pool; __bind_mempools() 2436 md->bs = p->bs; __bind_mempools() 2451 struct mapped_device *md = (struct mapped_device *) context; event_callback() local 2453 spin_lock_irqsave(&md->uevent_lock, flags); event_callback() 2454 list_splice_init(&md->uevent_list, &uevents); event_callback() 2455 spin_unlock_irqrestore(&md->uevent_lock, flags); event_callback() 2457 dm_send_uevents(&uevents, &disk_to_dev(md->disk)->kobj); event_callback() 2459 atomic_inc(&md->event_nr); event_callback() 2460 wake_up(&md->eventq); event_callback() 2464 * Protected by md->suspend_lock obtained by dm_swap_table(). 2466 static void __set_size(struct mapped_device *md, sector_t size) __set_size() argument 2468 set_capacity(md->disk, size); __set_size() 2470 i_size_write(md->bdev->bd_inode, (loff_t)size << SECTOR_SHIFT); __set_size() 2529 static struct dm_table *__bind(struct mapped_device *md, struct dm_table *t, __bind() argument 2533 struct request_queue *q = md->queue; __bind() 2542 if (size != dm_get_size(md)) __bind() 2543 memset(&md->geometry, 0, sizeof(md->geometry)); __bind() 2545 __set_size(md, size); __bind() 2547 dm_table_event_callback(t, event_callback, md); __bind() 2559 __bind_mempools(md, t); __bind() 2563 old_map = rcu_dereference_protected(md->map, lockdep_is_held(&md->suspend_lock)); __bind() 2564 rcu_assign_pointer(md->map, t); __bind() 2565 md->immutable_target_type = dm_table_get_immutable_target_type(t); __bind() 2569 set_bit(DMF_MERGE_IS_OPTIONAL, &md->flags); __bind() 2571 clear_bit(DMF_MERGE_IS_OPTIONAL, &md->flags); __bind() 2573 dm_sync_table(md); __bind() 2581 static struct dm_table *__unbind(struct mapped_device *md) __unbind() argument 2583 struct dm_table *map = rcu_dereference_protected(md->map, 1); __unbind() 2589 RCU_INIT_POINTER(md->map, NULL); __unbind() 2590 dm_sync_table(md); __unbind() 2600 struct mapped_device *md; dm_create() local 2602 md = alloc_dev(minor); dm_create() 2603 if (!md) dm_create() 2606 dm_sysfs_init(md); dm_create() 2608 *result = md; dm_create() 2613 * Functions to manage md->type. 2614 * All are required to hold md->type_lock. 2616 void dm_lock_md_type(struct mapped_device *md) dm_lock_md_type() argument 2618 mutex_lock(&md->type_lock); dm_lock_md_type() 2621 void dm_unlock_md_type(struct mapped_device *md) dm_unlock_md_type() argument 2623 mutex_unlock(&md->type_lock); dm_unlock_md_type() 2626 void dm_set_md_type(struct mapped_device *md, unsigned type) dm_set_md_type() argument 2628 BUG_ON(!mutex_is_locked(&md->type_lock)); dm_set_md_type() 2629 md->type = type; dm_set_md_type() 2632 unsigned dm_get_md_type(struct mapped_device *md) dm_get_md_type() argument 2634 BUG_ON(!mutex_is_locked(&md->type_lock)); dm_get_md_type() 2635 return md->type; dm_get_md_type() 2638 struct target_type *dm_get_immutable_target_type(struct mapped_device *md) dm_get_immutable_target_type() argument 2640 return md->immutable_target_type; dm_get_immutable_target_type() 2645 * count on 'md'. 2647 struct queue_limits *dm_get_queue_limits(struct mapped_device *md) dm_get_queue_limits() argument 2649 BUG_ON(!atomic_read(&md->holders)); dm_get_queue_limits() 2650 return &md->queue->limits; dm_get_queue_limits() 2654 static void init_rq_based_worker_thread(struct mapped_device *md) init_rq_based_worker_thread() argument 2657 init_kthread_worker(&md->kworker); init_rq_based_worker_thread() 2658 md->kworker_task = kthread_run(kthread_worker_fn, &md->kworker, init_rq_based_worker_thread() 2659 "kdmwork-%s", dm_device_name(md)); init_rq_based_worker_thread() 2665 static int dm_init_request_based_queue(struct mapped_device *md) dm_init_request_based_queue() argument 2670 q = blk_init_allocated_queue(md->queue, dm_request_fn, NULL); dm_init_request_based_queue() 2675 md->seq_rq_merge_deadline_usecs = 0; dm_init_request_based_queue() 2677 md->queue = q; dm_init_request_based_queue() 2678 dm_init_old_md_queue(md); dm_init_request_based_queue() 2679 blk_queue_softirq_done(md->queue, dm_softirq_done); dm_init_request_based_queue() 2680 blk_queue_prep_rq(md->queue, dm_prep_fn); dm_init_request_based_queue() 2682 init_rq_based_worker_thread(md); dm_init_request_based_queue() 2684 elv_register_queue(md->queue); dm_init_request_based_queue() 2693 struct mapped_device *md = data; dm_mq_init_request() local 2697 * Must initialize md member of tio, otherwise it won't dm_mq_init_request() 2700 tio->md = md; dm_mq_init_request() 2710 struct mapped_device *md = tio->md; dm_mq_queue_rq() local 2712 struct dm_table *map = dm_get_live_table(md, &srcu_idx); dm_mq_queue_rq() 2723 dm_put_live_table(md, srcu_idx); dm_mq_queue_rq() 2729 dm_start_request(md, rq); dm_mq_queue_rq() 2732 dm_put_live_table(md, srcu_idx); dm_mq_queue_rq() 2737 dm_start_request(md, rq); dm_mq_queue_rq() 2739 /* Init tio using md established in .init_request */ dm_mq_queue_rq() 2740 init_tio(tio, rq, md); dm_mq_queue_rq() 2752 (void) clone_rq(rq, md, tio, GFP_ATOMIC); dm_mq_queue_rq() 2753 queue_kthread_work(&md->kworker, &tio->work); dm_mq_queue_rq() 2756 if (map_request(tio, rq, md) == DM_MAPIO_REQUEUE) { dm_mq_queue_rq() 2758 rq_completed(md, rq_data_dir(rq), false); dm_mq_queue_rq() 2773 static int dm_init_request_based_blk_mq_queue(struct mapped_device *md) dm_init_request_based_blk_mq_queue() argument 2775 unsigned md_type = dm_get_md_type(md); dm_init_request_based_blk_mq_queue() 2779 memset(&md->tag_set, 0, sizeof(md->tag_set)); dm_init_request_based_blk_mq_queue() 2780 md->tag_set.ops = &dm_mq_ops; dm_init_request_based_blk_mq_queue() 2781 md->tag_set.queue_depth = BLKDEV_MAX_RQ; dm_init_request_based_blk_mq_queue() 2782 md->tag_set.numa_node = NUMA_NO_NODE; dm_init_request_based_blk_mq_queue() 2783 md->tag_set.flags = BLK_MQ_F_SHOULD_MERGE | BLK_MQ_F_SG_MERGE; dm_init_request_based_blk_mq_queue() 2784 md->tag_set.nr_hw_queues = 1; dm_init_request_based_blk_mq_queue() 2787 md->tag_set.cmd_size = sizeof(struct dm_rq_target_io) + sizeof(struct request); dm_init_request_based_blk_mq_queue() 2789 md->tag_set.cmd_size = sizeof(struct dm_rq_target_io); dm_init_request_based_blk_mq_queue() 2790 md->tag_set.driver_data = md; dm_init_request_based_blk_mq_queue() 2792 err = blk_mq_alloc_tag_set(&md->tag_set); dm_init_request_based_blk_mq_queue() 2796 q = blk_mq_init_allocated_queue(&md->tag_set, md->queue); dm_init_request_based_blk_mq_queue() 2801 md->queue = q; dm_init_request_based_blk_mq_queue() 2802 dm_init_md_queue(md); dm_init_request_based_blk_mq_queue() 2805 blk_mq_register_disk(md->disk); dm_init_request_based_blk_mq_queue() 2808 init_rq_based_worker_thread(md); dm_init_request_based_blk_mq_queue() 2813 blk_mq_free_tag_set(&md->tag_set); dm_init_request_based_blk_mq_queue() 2817 static unsigned filter_md_type(unsigned type, struct mapped_device *md) filter_md_type() argument 2822 return !md->use_blk_mq ? DM_TYPE_REQUEST_BASED : DM_TYPE_MQ_REQUEST_BASED; filter_md_type() 2826 * Setup the DM device's queue based on md's type 2828 int dm_setup_md_queue(struct mapped_device *md) dm_setup_md_queue() argument 2831 unsigned md_type = filter_md_type(dm_get_md_type(md), md); dm_setup_md_queue() 2835 r = dm_init_request_based_queue(md); dm_setup_md_queue() 2842 r = dm_init_request_based_blk_mq_queue(md); dm_setup_md_queue() 2849 dm_init_old_md_queue(md); dm_setup_md_queue() 2850 blk_queue_make_request(md->queue, dm_make_request); dm_setup_md_queue() 2851 blk_queue_merge_bvec(md->queue, dm_merge_bvec); dm_setup_md_queue() 2860 struct mapped_device *md; dm_get_md() local 2868 md = idr_find(&_minor_idr, minor); dm_get_md() 2869 if (md) { dm_get_md() 2870 if ((md == MINOR_ALLOCED || dm_get_md() 2871 (MINOR(disk_devt(dm_disk(md))) != minor) || dm_get_md() 2872 dm_deleting_md(md) || dm_get_md() 2873 test_bit(DMF_FREEING, &md->flags))) { dm_get_md() 2874 md = NULL; dm_get_md() 2877 dm_get(md); dm_get_md() 2883 return md; dm_get_md() 2887 void *dm_get_mdptr(struct mapped_device *md) dm_get_mdptr() argument 2889 return md->interface_ptr; dm_get_mdptr() 2892 void dm_set_mdptr(struct mapped_device *md, void *ptr) dm_set_mdptr() argument 2894 md->interface_ptr = ptr; dm_set_mdptr() 2897 void dm_get(struct mapped_device *md) dm_get() argument 2899 atomic_inc(&md->holders); dm_get() 2900 BUG_ON(test_bit(DMF_FREEING, &md->flags)); dm_get() 2903 int dm_hold(struct mapped_device *md) dm_hold() argument 2906 if (test_bit(DMF_FREEING, &md->flags)) { dm_hold() 2910 dm_get(md); dm_hold() 2916 const char *dm_device_name(struct mapped_device *md) dm_device_name() argument 2918 return md->name; dm_device_name() 2922 static void __dm_destroy(struct mapped_device *md, bool wait) __dm_destroy() argument 2930 idr_replace(&_minor_idr, MINOR_ALLOCED, MINOR(disk_devt(dm_disk(md)))); __dm_destroy() 2931 set_bit(DMF_FREEING, &md->flags); __dm_destroy() 2934 if (dm_request_based(md) && md->kworker_task) __dm_destroy() 2935 flush_kthread_worker(&md->kworker); __dm_destroy() 2941 mutex_lock(&md->suspend_lock); __dm_destroy() 2942 map = dm_get_live_table(md, &srcu_idx); __dm_destroy() 2943 if (!dm_suspended_md(md)) { __dm_destroy() 2948 dm_put_live_table(md, srcu_idx); __dm_destroy() 2949 mutex_unlock(&md->suspend_lock); __dm_destroy() 2958 while (atomic_read(&md->holders)) __dm_destroy() 2960 else if (atomic_read(&md->holders)) __dm_destroy() 2962 dm_device_name(md), atomic_read(&md->holders)); __dm_destroy() 2964 dm_sysfs_exit(md); __dm_destroy() 2965 dm_table_destroy(__unbind(md)); __dm_destroy() 2966 free_dev(md); __dm_destroy() 2969 void dm_destroy(struct mapped_device *md) dm_destroy() argument 2971 __dm_destroy(md, true); dm_destroy() 2974 void dm_destroy_immediate(struct mapped_device *md) dm_destroy_immediate() argument 2976 __dm_destroy(md, false); dm_destroy_immediate() 2979 void dm_put(struct mapped_device *md) dm_put() argument 2981 atomic_dec(&md->holders); dm_put() 2985 static int dm_wait_for_completion(struct mapped_device *md, int interruptible) dm_wait_for_completion() argument 2990 add_wait_queue(&md->wait, &wait); dm_wait_for_completion() 2995 if (!md_in_flight(md)) dm_wait_for_completion() 3008 remove_wait_queue(&md->wait, &wait); dm_wait_for_completion() 3018 struct mapped_device *md = container_of(work, struct mapped_device, dm_wq_work() local 3024 map = dm_get_live_table(md, &srcu_idx); dm_wq_work() 3026 while (!test_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags)) { dm_wq_work() 3027 spin_lock_irq(&md->deferred_lock); dm_wq_work() 3028 c = bio_list_pop(&md->deferred); dm_wq_work() 3029 spin_unlock_irq(&md->deferred_lock); dm_wq_work() 3034 if (dm_request_based(md)) dm_wq_work() 3037 __split_and_process_bio(md, map, c); dm_wq_work() 3040 dm_put_live_table(md, srcu_idx); dm_wq_work() 3043 static void dm_queue_flush(struct mapped_device *md) dm_queue_flush() argument 3045 clear_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags); dm_queue_flush() 3047 queue_work(md->wq, &md->work); dm_queue_flush() 3053 struct dm_table *dm_swap_table(struct mapped_device *md, struct dm_table *table) dm_swap_table() argument 3059 mutex_lock(&md->suspend_lock); dm_swap_table() 3062 if (!dm_suspended_md(md)) dm_swap_table() 3072 live_map = dm_get_live_table_fast(md); dm_swap_table() 3074 limits = md->queue->limits; dm_swap_table() 3075 dm_put_live_table_fast(md); dm_swap_table() 3086 map = __bind(md, table, &limits); dm_swap_table() 3089 mutex_unlock(&md->suspend_lock); dm_swap_table() 3097 static int lock_fs(struct mapped_device *md) lock_fs() argument 3101 WARN_ON(md->frozen_sb); lock_fs() 3103 md->frozen_sb = freeze_bdev(md->bdev); lock_fs() 3104 if (IS_ERR(md->frozen_sb)) { lock_fs() 3105 r = PTR_ERR(md->frozen_sb); lock_fs() 3106 md->frozen_sb = NULL; lock_fs() 3110 set_bit(DMF_FROZEN, &md->flags); lock_fs() 3115 static void unlock_fs(struct mapped_device *md) unlock_fs() argument 3117 if (!test_bit(DMF_FROZEN, &md->flags)) unlock_fs() 3120 thaw_bdev(md->bdev, md->frozen_sb); unlock_fs() 3121 md->frozen_sb = NULL; unlock_fs() 3122 clear_bit(DMF_FROZEN, &md->flags); unlock_fs() 3128 * are being added to md->deferred list. 3130 * Caller must hold md->suspend_lock 3132 static int __dm_suspend(struct mapped_device *md, struct dm_table *map, __dm_suspend() argument 3144 set_bit(DMF_NOFLUSH_SUSPENDING, &md->flags); __dm_suspend() 3159 r = lock_fs(md); __dm_suspend() 3176 * flush_workqueue(md->wq). __dm_suspend() 3178 set_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags); __dm_suspend() 3180 synchronize_srcu(&md->io_barrier); __dm_suspend() 3183 * Stop md->queue before flushing md->wq in case request-based __dm_suspend() 3184 * dm defers requests to md->wq from md->queue. __dm_suspend() 3186 if (dm_request_based(md)) { __dm_suspend() 3187 stop_queue(md->queue); __dm_suspend() 3188 if (md->kworker_task) __dm_suspend() 3189 flush_kthread_worker(&md->kworker); __dm_suspend() 3192 flush_workqueue(md->wq); __dm_suspend() 3199 r = dm_wait_for_completion(md, interruptible); __dm_suspend() 3202 clear_bit(DMF_NOFLUSH_SUSPENDING, &md->flags); __dm_suspend() 3204 synchronize_srcu(&md->io_barrier); __dm_suspend() 3208 dm_queue_flush(md); __dm_suspend() 3210 if (dm_request_based(md)) __dm_suspend() 3211 start_queue(md->queue); __dm_suspend() 3213 unlock_fs(md); __dm_suspend() 3237 int dm_suspend(struct mapped_device *md, unsigned suspend_flags) dm_suspend() argument 3243 mutex_lock_nested(&md->suspend_lock, SINGLE_DEPTH_NESTING); dm_suspend() 3245 if (dm_suspended_md(md)) { dm_suspend() 3250 if (dm_suspended_internally_md(md)) { dm_suspend() 3252 mutex_unlock(&md->suspend_lock); dm_suspend() 3253 r = wait_on_bit(&md->flags, DMF_SUSPENDED_INTERNALLY, TASK_INTERRUPTIBLE); dm_suspend() 3259 map = rcu_dereference_protected(md->map, lockdep_is_held(&md->suspend_lock)); dm_suspend() 3261 r = __dm_suspend(md, map, suspend_flags, TASK_INTERRUPTIBLE); dm_suspend() 3265 set_bit(DMF_SUSPENDED, &md->flags); dm_suspend() 3270 mutex_unlock(&md->suspend_lock); dm_suspend() 3274 static int __dm_resume(struct mapped_device *md, struct dm_table *map) __dm_resume() argument 3282 dm_queue_flush(md); __dm_resume() 3289 if (dm_request_based(md)) __dm_resume() 3290 start_queue(md->queue); __dm_resume() 3292 unlock_fs(md); __dm_resume() 3297 int dm_resume(struct mapped_device *md) dm_resume() argument 3303 mutex_lock_nested(&md->suspend_lock, SINGLE_DEPTH_NESTING); dm_resume() 3305 if (!dm_suspended_md(md)) dm_resume() 3308 if (dm_suspended_internally_md(md)) { dm_resume() 3310 mutex_unlock(&md->suspend_lock); dm_resume() 3311 r = wait_on_bit(&md->flags, DMF_SUSPENDED_INTERNALLY, TASK_INTERRUPTIBLE); dm_resume() 3317 map = rcu_dereference_protected(md->map, lockdep_is_held(&md->suspend_lock)); dm_resume() 3321 r = __dm_resume(md, map); dm_resume() 3325 clear_bit(DMF_SUSPENDED, &md->flags); dm_resume() 3329 mutex_unlock(&md->suspend_lock); dm_resume() 3340 static void __dm_internal_suspend(struct mapped_device *md, unsigned suspend_flags) __dm_internal_suspend() argument 3344 if (md->internal_suspend_count++) __dm_internal_suspend() 3347 if (dm_suspended_md(md)) { __dm_internal_suspend() 3348 set_bit(DMF_SUSPENDED_INTERNALLY, &md->flags); __dm_internal_suspend() 3352 map = rcu_dereference_protected(md->map, lockdep_is_held(&md->suspend_lock)); __dm_internal_suspend() 3360 (void) __dm_suspend(md, map, suspend_flags, TASK_UNINTERRUPTIBLE); __dm_internal_suspend() 3362 set_bit(DMF_SUSPENDED_INTERNALLY, &md->flags); __dm_internal_suspend() 3367 static void __dm_internal_resume(struct mapped_device *md) __dm_internal_resume() argument 3369 BUG_ON(!md->internal_suspend_count); __dm_internal_resume() 3371 if (--md->internal_suspend_count) __dm_internal_resume() 3374 if (dm_suspended_md(md)) __dm_internal_resume() 3381 (void) __dm_resume(md, NULL); __dm_internal_resume() 3384 clear_bit(DMF_SUSPENDED_INTERNALLY, &md->flags); __dm_internal_resume() 3386 wake_up_bit(&md->flags, DMF_SUSPENDED_INTERNALLY); __dm_internal_resume() 3389 void dm_internal_suspend_noflush(struct mapped_device *md) dm_internal_suspend_noflush() argument 3391 mutex_lock(&md->suspend_lock); dm_internal_suspend_noflush() 3392 __dm_internal_suspend(md, DM_SUSPEND_NOFLUSH_FLAG); dm_internal_suspend_noflush() 3393 mutex_unlock(&md->suspend_lock); dm_internal_suspend_noflush() 3397 void dm_internal_resume(struct mapped_device *md) dm_internal_resume() argument 3399 mutex_lock(&md->suspend_lock); dm_internal_resume() 3400 __dm_internal_resume(md); dm_internal_resume() 3401 mutex_unlock(&md->suspend_lock); dm_internal_resume() 3406 * Fast variants of internal suspend/resume hold md->suspend_lock, 3410 void dm_internal_suspend_fast(struct mapped_device *md) dm_internal_suspend_fast() argument 3412 mutex_lock(&md->suspend_lock); dm_internal_suspend_fast() 3413 if (dm_suspended_md(md) || dm_suspended_internally_md(md)) dm_internal_suspend_fast() 3416 set_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags); dm_internal_suspend_fast() 3417 synchronize_srcu(&md->io_barrier); dm_internal_suspend_fast() 3418 flush_workqueue(md->wq); dm_internal_suspend_fast() 3419 dm_wait_for_completion(md, TASK_UNINTERRUPTIBLE); dm_internal_suspend_fast() 3423 void dm_internal_resume_fast(struct mapped_device *md) dm_internal_resume_fast() argument 3425 if (dm_suspended_md(md) || dm_suspended_internally_md(md)) dm_internal_resume_fast() 3428 dm_queue_flush(md); dm_internal_resume_fast() 3431 mutex_unlock(&md->suspend_lock); dm_internal_resume_fast() 3438 int dm_kobject_uevent(struct mapped_device *md, enum kobject_action action, dm_kobject_uevent() argument 3445 return kobject_uevent(&disk_to_dev(md->disk)->kobj, action); dm_kobject_uevent() 3449 return kobject_uevent_env(&disk_to_dev(md->disk)->kobj, dm_kobject_uevent() 3454 uint32_t dm_next_uevent_seq(struct mapped_device *md) dm_next_uevent_seq() argument 3456 return atomic_add_return(1, &md->uevent_seq); dm_next_uevent_seq() 3459 uint32_t dm_get_event_nr(struct mapped_device *md) dm_get_event_nr() argument 3461 return atomic_read(&md->event_nr); dm_get_event_nr() 3464 int dm_wait_event(struct mapped_device *md, int event_nr) dm_wait_event() argument 3466 return wait_event_interruptible(md->eventq, dm_wait_event() 3467 (event_nr != atomic_read(&md->event_nr))); dm_wait_event() 3470 void dm_uevent_add(struct mapped_device *md, struct list_head *elist) dm_uevent_add() argument 3474 spin_lock_irqsave(&md->uevent_lock, flags); dm_uevent_add() 3475 list_add(elist, &md->uevent_list); dm_uevent_add() 3476 spin_unlock_irqrestore(&md->uevent_lock, flags); dm_uevent_add() 3481 * count on 'md'. 3483 struct gendisk *dm_disk(struct mapped_device *md) dm_disk() argument 3485 return md->disk; dm_disk() 3489 struct kobject *dm_kobject(struct mapped_device *md) dm_kobject() argument 3491 return &md->kobj_holder.kobj; dm_kobject() 3496 struct mapped_device *md; dm_get_from_kobject() local 3498 md = container_of(kobj, struct mapped_device, kobj_holder.kobj); dm_get_from_kobject() 3500 if (test_bit(DMF_FREEING, &md->flags) || dm_get_from_kobject() 3501 dm_deleting_md(md)) dm_get_from_kobject() 3504 dm_get(md); dm_get_from_kobject() 3505 return md; dm_get_from_kobject() 3508 int dm_suspended_md(struct mapped_device *md) dm_suspended_md() argument 3510 return test_bit(DMF_SUSPENDED, &md->flags); dm_suspended_md() 3513 int dm_suspended_internally_md(struct mapped_device *md) dm_suspended_internally_md() argument 3515 return test_bit(DMF_SUSPENDED_INTERNALLY, &md->flags); dm_suspended_internally_md() 3518 int dm_test_deferred_remove_flag(struct mapped_device *md) dm_test_deferred_remove_flag() argument 3520 return test_bit(DMF_DEFERRED_REMOVE, &md->flags); dm_test_deferred_remove_flag() 3535 struct dm_md_mempools *dm_alloc_md_mempools(struct mapped_device *md, unsigned type, dm_alloc_md_mempools() argument 3546 type = filter_md_type(type, md); dm_alloc_md_mempools() 741 open_table_device(struct table_device *td, dev_t dev, struct mapped_device *md) open_table_device() argument 1885 init_tio(struct dm_rq_target_io *tio, struct request *rq, struct mapped_device *md) init_tio() argument 1898 prep_tio(struct request *rq, struct mapped_device *md, gfp_t gfp_mask) prep_tio() argument 1953 map_request(struct dm_rq_target_io *tio, struct request *rq, struct mapped_device *md) map_request() argument
|
H A D | dm-era-target.c | 33 struct writeset_metadata md; member in struct:writeset 73 ws->md.nr_bits = nr_blocks; writeset_alloc() 74 ws->md.root = INVALID_WRITESET_ROOT; writeset_alloc() 91 memset(ws->bits, 0, bitset_size(ws->md.nr_bits)); writeset_init() 93 r = setup_on_disk_bitset(info, ws->md.nr_bits, &ws->md.root); writeset_init() 137 r = dm_bitset_set_bit(info, ws->md.root, block, &ws->md.root); writeset_test_and_set() 300 static int superblock_read_lock(struct era_metadata *md, superblock_read_lock() argument 303 return dm_bm_read_lock(md->bm, SUPERBLOCK_LOCATION, superblock_read_lock() 307 static int superblock_lock_zero(struct era_metadata *md, superblock_lock_zero() argument 310 return dm_bm_write_lock_zero(md->bm, SUPERBLOCK_LOCATION, superblock_lock_zero() 314 static int superblock_lock(struct era_metadata *md, superblock_lock() argument 317 return dm_bm_write_lock(md->bm, SUPERBLOCK_LOCATION, superblock_lock() 365 struct era_metadata *md = context; ws_inc() local 372 dm_tm_inc(md->tm, b); ws_inc() 377 struct era_metadata *md = context; ws_dec() local 384 dm_bitset_del(&md->bitset_info, b); ws_dec() 394 static void setup_writeset_tree_info(struct era_metadata *md) setup_writeset_tree_info() argument 396 struct dm_btree_value_type *vt = &md->writeset_tree_info.value_type; setup_writeset_tree_info() 397 md->writeset_tree_info.tm = md->tm; setup_writeset_tree_info() 398 md->writeset_tree_info.levels = 1; setup_writeset_tree_info() 399 vt->context = md; setup_writeset_tree_info() 406 static void setup_era_array_info(struct era_metadata *md) setup_era_array_info() argument 416 dm_array_info_init(&md->era_array_info, md->tm, &vt); setup_era_array_info() 419 static void setup_infos(struct era_metadata *md) setup_infos() argument 421 dm_disk_bitset_init(md->tm, &md->bitset_info); setup_infos() 422 setup_writeset_tree_info(md); setup_infos() 423 setup_era_array_info(md); setup_infos() 428 static int create_fresh_metadata(struct era_metadata *md) create_fresh_metadata() argument 432 r = dm_tm_create_with_sm(md->bm, SUPERBLOCK_LOCATION, create_fresh_metadata() 433 &md->tm, &md->sm); create_fresh_metadata() 439 setup_infos(md); create_fresh_metadata() 441 r = dm_btree_empty(&md->writeset_tree_info, &md->writeset_tree_root); create_fresh_metadata() 447 r = dm_array_empty(&md->era_array_info, &md->era_array_root); create_fresh_metadata() 456 dm_sm_destroy(md->sm); create_fresh_metadata() 457 dm_tm_destroy(md->tm); create_fresh_metadata() 462 static int save_sm_root(struct era_metadata *md) save_sm_root() argument 467 r = dm_sm_root_size(md->sm, &metadata_len); save_sm_root() 471 return dm_sm_copy_root(md->sm, &md->metadata_space_map_root, save_sm_root() 475 static void copy_sm_root(struct era_metadata *md, struct superblock_disk *disk) copy_sm_root() argument 478 &md->metadata_space_map_root, copy_sm_root() 479 sizeof(md->metadata_space_map_root)); copy_sm_root() 484 * with every commit (possible optimisation here). 'md' should be fully 487 static void prepare_superblock(struct era_metadata *md, struct superblock_disk *disk) prepare_superblock() argument 496 copy_sm_root(md, disk); prepare_superblock() 498 disk->data_block_size = cpu_to_le32(md->block_size); prepare_superblock() 500 disk->nr_blocks = cpu_to_le32(md->nr_blocks); prepare_superblock() 501 disk->current_era = cpu_to_le32(md->current_era); prepare_superblock() 503 ws_pack(&md->current_writeset->md, &disk->current_writeset); prepare_superblock() 504 disk->writeset_tree_root = cpu_to_le64(md->writeset_tree_root); prepare_superblock() 505 disk->era_array_root = cpu_to_le64(md->era_array_root); prepare_superblock() 506 disk->metadata_snap = cpu_to_le64(md->metadata_snap); prepare_superblock() 509 static int write_superblock(struct era_metadata *md) write_superblock() argument 515 r = save_sm_root(md); write_superblock() 521 r = superblock_lock_zero(md, &sblock); write_superblock() 526 prepare_superblock(md, disk); write_superblock() 528 return dm_tm_commit(md->tm, sblock); write_superblock() 534 static int format_metadata(struct era_metadata *md) format_metadata() argument 538 r = create_fresh_metadata(md); format_metadata() 542 r = write_superblock(md); format_metadata() 544 dm_sm_destroy(md->sm); format_metadata() 545 dm_tm_destroy(md->tm); format_metadata() 552 static int open_metadata(struct era_metadata *md) open_metadata() argument 558 r = superblock_read_lock(md, &sblock); open_metadata() 565 r = dm_tm_open_with_sm(md->bm, SUPERBLOCK_LOCATION, open_metadata() 568 &md->tm, &md->sm); open_metadata() 574 setup_infos(md); open_metadata() 576 md->block_size = le32_to_cpu(disk->data_block_size); open_metadata() 577 md->nr_blocks = le32_to_cpu(disk->nr_blocks); open_metadata() 578 md->current_era = le32_to_cpu(disk->current_era); open_metadata() 580 md->writeset_tree_root = le64_to_cpu(disk->writeset_tree_root); open_metadata() 581 md->era_array_root = le64_to_cpu(disk->era_array_root); open_metadata() 582 md->metadata_snap = le64_to_cpu(disk->metadata_snap); open_metadata() 583 md->archived_writesets = true; open_metadata() 592 static int open_or_format_metadata(struct era_metadata *md, open_or_format_metadata() argument 598 r = superblock_all_zeroes(md->bm, &unformatted); open_or_format_metadata() 603 return may_format ? format_metadata(md) : -EPERM; open_or_format_metadata() 605 return open_metadata(md); open_or_format_metadata() 608 static int create_persistent_data_objects(struct era_metadata *md, create_persistent_data_objects() argument 613 md->bm = dm_block_manager_create(md->bdev, DM_ERA_METADATA_BLOCK_SIZE, create_persistent_data_objects() 616 if (IS_ERR(md->bm)) { create_persistent_data_objects() 618 return PTR_ERR(md->bm); create_persistent_data_objects() 621 r = open_or_format_metadata(md, may_format); create_persistent_data_objects() 623 dm_block_manager_destroy(md->bm); create_persistent_data_objects() 628 static void destroy_persistent_data_objects(struct era_metadata *md) destroy_persistent_data_objects() argument 630 dm_sm_destroy(md->sm); destroy_persistent_data_objects() 631 dm_tm_destroy(md->tm); destroy_persistent_data_objects() 632 dm_block_manager_destroy(md->bm); destroy_persistent_data_objects() 638 static void swap_writeset(struct era_metadata *md, struct writeset *new_writeset) swap_writeset() argument 640 rcu_assign_pointer(md->current_writeset, new_writeset); swap_writeset() 661 static int metadata_digest_lookup_writeset(struct era_metadata *md, 664 static int metadata_digest_remove_writeset(struct era_metadata *md, metadata_digest_remove_writeset() argument 670 r = dm_btree_remove(&md->writeset_tree_info, md->writeset_tree_root, metadata_digest_remove_writeset() 671 &key, &md->writeset_tree_root); metadata_digest_remove_writeset() 683 static int metadata_digest_transcribe_writeset(struct era_metadata *md, metadata_digest_transcribe_writeset() argument 701 r = dm_array_set_value(&md->era_array_info, md->era_array_root, metadata_digest_transcribe_writeset() 702 b, &d->value, &md->era_array_root); metadata_digest_transcribe_writeset() 717 static int metadata_digest_lookup_writeset(struct era_metadata *md, metadata_digest_lookup_writeset() argument 724 r = dm_btree_find_lowest_key(&md->writeset_tree_info, metadata_digest_lookup_writeset() 725 md->writeset_tree_root, &key); metadata_digest_lookup_writeset() 731 r = dm_btree_lookup(&md->writeset_tree_info, metadata_digest_lookup_writeset() 732 md->writeset_tree_root, &key, &disk); metadata_digest_lookup_writeset() 746 d->nr_bits = min(d->writeset.nr_bits, md->nr_blocks); metadata_digest_lookup_writeset() 753 static int metadata_digest_start(struct era_metadata *md, struct digest *d) metadata_digest_start() argument 764 dm_disk_bitset_init(md->tm, &d->info); metadata_digest_start() 779 struct era_metadata *md = kzalloc(sizeof(*md), GFP_KERNEL); metadata_open() local 781 if (!md) metadata_open() 784 md->bdev = bdev; metadata_open() 785 md->block_size = block_size; metadata_open() 787 md->writesets[0].md.root = INVALID_WRITESET_ROOT; metadata_open() 788 md->writesets[1].md.root = INVALID_WRITESET_ROOT; metadata_open() 789 md->current_writeset = &md->writesets[0]; metadata_open() 791 r = create_persistent_data_objects(md, may_format); metadata_open() 793 kfree(md); metadata_open() 797 return md; metadata_open() 800 static void metadata_close(struct era_metadata *md) metadata_close() argument 802 destroy_persistent_data_objects(md); metadata_close() 803 kfree(md); metadata_close() 815 static int metadata_resize(struct era_metadata *md, void *arg) metadata_resize() argument 827 writeset_free(&md->writesets[0]); metadata_resize() 828 writeset_free(&md->writesets[1]); metadata_resize() 830 r = writeset_alloc(&md->writesets[0], *new_size); metadata_resize() 836 r = writeset_alloc(&md->writesets[1], *new_size); metadata_resize() 844 r = dm_array_resize(&md->era_array_info, md->era_array_root, metadata_resize() 845 md->nr_blocks, *new_size, metadata_resize() 846 &value, &md->era_array_root); metadata_resize() 852 md->nr_blocks = *new_size; metadata_resize() 856 static int metadata_era_archive(struct era_metadata *md) metadata_era_archive() argument 862 r = dm_bitset_flush(&md->bitset_info, md->current_writeset->md.root, metadata_era_archive() 863 &md->current_writeset->md.root); metadata_era_archive() 869 ws_pack(&md->current_writeset->md, &value); metadata_era_archive() 870 md->current_writeset->md.root = INVALID_WRITESET_ROOT; metadata_era_archive() 872 keys[0] = md->current_era; metadata_era_archive() 874 r = dm_btree_insert(&md->writeset_tree_info, md->writeset_tree_root, metadata_era_archive() 875 keys, &value, &md->writeset_tree_root); metadata_era_archive() 882 md->archived_writesets = true; metadata_era_archive() 887 static struct writeset *next_writeset(struct era_metadata *md) next_writeset() argument 889 return (md->current_writeset == &md->writesets[0]) ? next_writeset() 890 &md->writesets[1] : &md->writesets[0]; next_writeset() 893 static int metadata_new_era(struct era_metadata *md) metadata_new_era() argument 896 struct writeset *new_writeset = next_writeset(md); metadata_new_era() 898 r = writeset_init(&md->bitset_info, new_writeset); metadata_new_era() 904 swap_writeset(md, new_writeset); metadata_new_era() 905 md->current_era++; metadata_new_era() 910 static int metadata_era_rollover(struct era_metadata *md) metadata_era_rollover() argument 914 if (md->current_writeset->md.root != INVALID_WRITESET_ROOT) { metadata_era_rollover() 915 r = metadata_era_archive(md); metadata_era_rollover() 923 r = metadata_new_era(md); metadata_era_rollover() 933 static bool metadata_current_marked(struct era_metadata *md, dm_block_t block) metadata_current_marked() argument 939 ws = rcu_dereference(md->current_writeset); metadata_current_marked() 946 static int metadata_commit(struct era_metadata *md) metadata_commit() argument 951 if (md->current_writeset->md.root != SUPERBLOCK_LOCATION) { metadata_commit() 952 r = dm_bitset_flush(&md->bitset_info, md->current_writeset->md.root, metadata_commit() 953 &md->current_writeset->md.root); metadata_commit() 960 r = save_sm_root(md); metadata_commit() 966 r = dm_tm_pre_commit(md->tm); metadata_commit() 972 r = superblock_lock(md, &sblock); metadata_commit() 978 prepare_superblock(md, dm_block_data(sblock)); metadata_commit() 980 return dm_tm_commit(md->tm, sblock); metadata_commit() 983 static int metadata_checkpoint(struct era_metadata *md) metadata_checkpoint() argument 989 return metadata_era_rollover(md); metadata_checkpoint() 995 static int metadata_take_snap(struct era_metadata *md) metadata_take_snap() argument 1000 if (md->metadata_snap != SUPERBLOCK_LOCATION) { metadata_take_snap() 1005 r = metadata_era_rollover(md); metadata_take_snap() 1011 r = metadata_commit(md); metadata_take_snap() 1017 r = dm_sm_inc_block(md->sm, SUPERBLOCK_LOCATION); metadata_take_snap() 1023 r = dm_tm_shadow_block(md->tm, SUPERBLOCK_LOCATION, metadata_take_snap() 1027 dm_sm_dec_block(md->sm, SUPERBLOCK_LOCATION); metadata_take_snap() 1032 r = dm_sm_inc_block(md->sm, md->writeset_tree_root); metadata_take_snap() 1035 dm_tm_unlock(md->tm, clone); metadata_take_snap() 1039 r = dm_sm_inc_block(md->sm, md->era_array_root); metadata_take_snap() 1042 dm_sm_dec_block(md->sm, md->writeset_tree_root); metadata_take_snap() 1043 dm_tm_unlock(md->tm, clone); metadata_take_snap() 1047 md->metadata_snap = dm_block_location(clone); metadata_take_snap() 1049 r = dm_tm_unlock(md->tm, clone); metadata_take_snap() 1052 md->metadata_snap = SUPERBLOCK_LOCATION; metadata_take_snap() 1059 static int metadata_drop_snap(struct era_metadata *md) metadata_drop_snap() argument 1066 if (md->metadata_snap == SUPERBLOCK_LOCATION) { metadata_drop_snap() 1071 r = dm_tm_read_lock(md->tm, md->metadata_snap, &sb_validator, &clone); metadata_drop_snap() 1081 md->metadata_snap = SUPERBLOCK_LOCATION; metadata_drop_snap() 1084 r = dm_btree_del(&md->writeset_tree_info, metadata_drop_snap() 1088 dm_tm_unlock(md->tm, clone); metadata_drop_snap() 1092 r = dm_array_del(&md->era_array_info, le64_to_cpu(disk->era_array_root)); metadata_drop_snap() 1095 dm_tm_unlock(md->tm, clone); metadata_drop_snap() 1100 dm_tm_unlock(md->tm, clone); metadata_drop_snap() 1102 return dm_sm_dec_block(md->sm, location); metadata_drop_snap() 1112 static int metadata_get_stats(struct era_metadata *md, void *ptr) metadata_get_stats() argument 1118 r = dm_sm_get_nr_free(md->sm, &nr_free); metadata_get_stats() 1124 r = dm_sm_get_nr_blocks(md->sm, &nr_total); metadata_get_stats() 1132 s->snap = md->metadata_snap; metadata_get_stats() 1133 s->era = md->current_era; metadata_get_stats() 1150 struct era_metadata *md; member in struct:era 1217 r = era->digest.step(era->md, &era->digest); process_old_eras() 1243 r = writeset_test_and_set(&era->md->bitset_info, process_deferred_bios() 1244 era->md->current_writeset, process_deferred_bios() 1260 r = metadata_commit(era->md); process_deferred_bios() 1286 rpc->result = rpc->fn0 ? rpc->fn0(era->md) : rpc->fn1(era->md, rpc->arg); process_rpc_calls() 1291 r = metadata_commit(era->md); process_rpc_calls() 1303 if (era->md->archived_writesets) { kick_off_digest() 1304 era->md->archived_writesets = false; kick_off_digest() 1305 metadata_digest_start(era->md, &era->digest); kick_off_digest() 1394 if (era->md) era_destroy() 1395 metadata_close(era->md); era_destroy() 1430 struct era_metadata *md; era_ctr() local 1483 md = metadata_open(era->metadata_dev->bdev, era->sectors_per_block, true); era_ctr() 1484 if (IS_ERR(md)) { era_ctr() 1487 return PTR_ERR(md); era_ctr() 1489 era->md = md; era_ctr() 1493 r = metadata_resize(era->md, &era->nr_blocks); era_ctr() 1548 !metadata_current_marked(era->md, block)) { era_map()
|
H A D | dm-sysfs.c | 25 struct mapped_device *md; dm_attr_show() local 32 md = dm_get_from_kobject(kobj); dm_attr_show() 33 if (!md) dm_attr_show() 36 ret = dm_attr->show(md, page); dm_attr_show() 37 dm_put(md); dm_attr_show() 50 struct mapped_device *md; dm_attr_store() local 57 md = dm_get_from_kobject(kobj); dm_attr_store() 58 if (!md) dm_attr_store() 61 ret = dm_attr->store(md, page, count); dm_attr_store() 62 dm_put(md); dm_attr_store() 67 static ssize_t dm_attr_name_show(struct mapped_device *md, char *buf) dm_attr_name_show() argument 69 if (dm_copy_name_and_uuid(md, buf, NULL)) dm_attr_name_show() 76 static ssize_t dm_attr_uuid_show(struct mapped_device *md, char *buf) dm_attr_uuid_show() argument 78 if (dm_copy_name_and_uuid(md, NULL, buf)) dm_attr_uuid_show() 85 static ssize_t dm_attr_suspended_show(struct mapped_device *md, char *buf) dm_attr_suspended_show() argument 87 sprintf(buf, "%d\n", dm_suspended_md(md)); dm_attr_suspended_show() 92 static ssize_t dm_attr_use_blk_mq_show(struct mapped_device *md, char *buf) dm_attr_use_blk_mq_show() argument 94 sprintf(buf, "%d\n", dm_use_blk_mq(md)); dm_attr_use_blk_mq_show() 127 * because nobody using md yet, no need to call explicit dm_get/put 129 int dm_sysfs_init(struct mapped_device *md) dm_sysfs_init() argument 131 return kobject_init_and_add(dm_kobject(md), &dm_ktype, dm_sysfs_init() 132 &disk_to_dev(dm_disk(md))->kobj, dm_sysfs_init() 139 void dm_sysfs_exit(struct mapped_device *md) dm_sysfs_exit() argument 141 struct kobject *kobj = dm_kobject(md); dm_sysfs_exit()
|
H A D | dm-ioctl.c | 35 struct mapped_device *md; member in struct:hash_cell 118 dm_get(hc->md); __get_name_cell() 132 dm_get(hc->md); __get_uuid_cell() 141 struct mapped_device *md; __get_dev_cell() local 144 md = dm_get_md(huge_decode_dev(dev)); __get_dev_cell() 145 if (!md) __get_dev_cell() 148 hc = dm_get_mdptr(md); __get_dev_cell() 150 dm_put(md); __get_dev_cell() 161 struct mapped_device *md) alloc_cell() 189 hc->md = md; alloc_cell() 207 static int dm_hash_insert(const char *name, const char *uuid, struct mapped_device *md) dm_hash_insert() argument 214 cell = alloc_cell(name, uuid, md); dm_hash_insert() 224 dm_put(hc->md); dm_hash_insert() 234 dm_put(hc->md); dm_hash_insert() 239 dm_get(md); dm_hash_insert() 241 dm_set_mdptr(md, cell); dm_hash_insert() 262 dm_set_mdptr(hc->md, NULL); __hash_remove() 265 table = dm_get_live_table(hc->md, &srcu_idx); __hash_remove() 268 dm_put_live_table(hc->md, srcu_idx); __hash_remove() 273 dm_put(hc->md); __hash_remove() 283 struct mapped_device *md; dm_hash_remove_all() local 293 md = hc->md; dm_hash_remove_all() 294 dm_get(md); dm_hash_remove_all() 297 dm_lock_for_deletion(md, mark_deferred, only_deferred)) { dm_hash_remove_all() 298 dm_put(md); dm_hash_remove_all() 308 dm_sync_table(md); dm_hash_remove_all() 311 dm_put(md); dm_hash_remove_all() 313 dm_destroy(md); dm_hash_remove_all() 315 dm_destroy_immediate(md); dm_hash_remove_all() 374 struct mapped_device *md; dm_hash_rename() local 400 dm_put(hc->md); dm_hash_rename() 425 dm_put(hc->md); dm_hash_rename() 439 table = dm_get_live_table(hc->md, &srcu_idx); dm_hash_rename() 442 dm_put_live_table(hc->md, srcu_idx); dm_hash_rename() 444 if (!dm_kobject_uevent(hc->md, KOBJ_CHANGE, param->event_nr)) dm_hash_rename() 447 md = hc->md; dm_hash_rename() 451 return md; dm_hash_rename() 543 disk = dm_disk(hc->md); list_devices() 645 static struct dm_table *dm_get_inactive_table(struct mapped_device *md, int *srcu_idx) dm_get_inactive_table() argument 651 dm_get_live_table(md, srcu_idx); dm_get_inactive_table() 654 hc = dm_get_mdptr(md); dm_get_inactive_table() 655 if (!hc || hc->md != md) { dm_get_inactive_table() 668 static struct dm_table *dm_get_live_or_inactive_table(struct mapped_device *md, dm_get_live_or_inactive_table() argument 673 dm_get_inactive_table(md, srcu_idx) : dm_get_live_table(md, srcu_idx); dm_get_live_or_inactive_table() 680 static void __dev_status(struct mapped_device *md, struct dm_ioctl *param) __dev_status() argument 682 struct gendisk *disk = dm_disk(md); __dev_status() 689 if (dm_suspended_md(md)) __dev_status() 692 if (dm_suspended_internally_md(md)) __dev_status() 695 if (dm_test_deferred_remove_flag(md)) __dev_status() 705 param->open_count = dm_open_count(md); __dev_status() 707 param->event_nr = dm_get_event_nr(md); __dev_status() 710 table = dm_get_live_table(md, &srcu_idx); __dev_status() 720 dm_put_live_table(md, srcu_idx); __dev_status() 724 table = dm_get_inactive_table(md, &srcu_idx); __dev_status() 730 dm_put_live_table(md, srcu_idx); __dev_status() 737 struct mapped_device *md; dev_create() local 746 r = dm_create(m, &md); dev_create() 750 r = dm_hash_insert(param->name, *param->uuid ? param->uuid : NULL, md); dev_create() 752 dm_put(md); dev_create() 753 dm_destroy(md); dev_create() 759 __dev_status(md, param); dev_create() 761 dm_put(md); dev_create() 815 struct mapped_device *md = NULL; find_device() local 820 md = hc->md; find_device() 823 return md; find_device() 829 struct mapped_device *md; dev_remove() local 842 md = hc->md; dev_remove() 847 r = dm_lock_for_deletion(md, !!(param->flags & DM_DEFERRED_REMOVE), false); dev_remove() 851 dm_put(md); dev_remove() 856 dm_put(md); dev_remove() 864 dm_sync_table(md); dev_remove() 870 if (!dm_kobject_uevent(md, KOBJ_REMOVE, param->event_nr)) dev_remove() 873 dm_put(md); dev_remove() 874 dm_destroy(md); dev_remove() 895 struct mapped_device *md; dev_rename() local 911 md = dm_hash_rename(param, new_data); dev_rename() 912 if (IS_ERR(md)) dev_rename() 913 return PTR_ERR(md); dev_rename() 915 __dev_status(md, param); dev_rename() 916 dm_put(md); dev_rename() 924 struct mapped_device *md; dev_set_geometry() local 930 md = find_device(param); dev_set_geometry() 931 if (!md) dev_set_geometry() 959 r = dm_set_geometry(md, &geometry); dev_set_geometry() 964 dm_put(md); dev_set_geometry() 972 struct mapped_device *md; do_suspend() local 974 md = find_device(param); do_suspend() 975 if (!md) do_suspend() 983 if (!dm_suspended_md(md)) { do_suspend() 984 r = dm_suspend(md, suspend_flags); do_suspend() 989 __dev_status(md, param); do_suspend() 992 dm_put(md); do_suspend() 1002 struct mapped_device *md; do_resume() local 1014 md = hc->md; do_resume() 1029 if (!dm_suspended_md(md)) do_resume() 1030 dm_suspend(md, suspend_flags); do_resume() 1032 old_map = dm_swap_table(md, new_map); do_resume() 1034 dm_sync_table(md); do_resume() 1036 dm_put(md); do_resume() 1041 set_disk_ro(dm_disk(md), 0); do_resume() 1043 set_disk_ro(dm_disk(md), 1); do_resume() 1046 if (dm_suspended_md(md)) { do_resume() 1047 r = dm_resume(md); do_resume() 1048 if (!r && !dm_kobject_uevent(md, KOBJ_CHANGE, param->event_nr)) do_resume() 1060 __dev_status(md, param); do_resume() 1062 dm_put(md); do_resume() 1084 struct mapped_device *md; dev_status() local 1086 md = find_device(param); dev_status() 1087 if (!md) dev_status() 1090 __dev_status(md, param); dev_status() 1091 dm_put(md); dev_status() 1176 struct mapped_device *md; dev_wait() local 1180 md = find_device(param); dev_wait() 1181 if (!md) dev_wait() 1187 if (dm_wait_event(md, param->event_nr)) { dev_wait() 1197 __dev_status(md, param); dev_wait() 1199 table = dm_get_live_or_inactive_table(md, param, &srcu_idx); dev_wait() 1202 dm_put_live_table(md, srcu_idx); dev_wait() 1205 dm_put(md); dev_wait() 1275 struct mapped_device *md; table_load() local 1278 md = find_device(param); table_load() 1279 if (!md) table_load() 1282 r = dm_table_create(&t, get_mode(param), param->target_count, md); table_load() 1286 /* Protect md->type and md->queue against concurrent table loads. */ table_load() 1287 dm_lock_md_type(md); table_load() 1292 immutable_target_type = dm_get_immutable_target_type(md); table_load() 1301 if (dm_get_md_type(md) == DM_TYPE_NONE) { table_load() 1303 dm_set_md_type(md, dm_table_get_type(t)); table_load() 1305 /* setup md->queue to reflect md's type (may block) */ table_load() 1306 r = dm_setup_md_queue(md); table_load() 1311 } else if (dm_get_md_type(md) != dm_table_get_type(t)) { table_load() 1317 dm_unlock_md_type(md); table_load() 1321 hc = dm_get_mdptr(md); table_load() 1322 if (!hc || hc->md != md) { table_load() 1335 __dev_status(md, param); table_load() 1338 dm_sync_table(md); table_load() 1342 dm_put(md); table_load() 1347 dm_unlock_md_type(md); table_load() 1351 dm_put(md); table_load() 1359 struct mapped_device *md; table_clear() local 1378 __dev_status(hc->md, param); table_clear() 1379 md = hc->md; table_clear() 1382 dm_sync_table(md); table_clear() 1385 dm_put(md); table_clear() 1432 struct mapped_device *md; table_deps() local 1436 md = find_device(param); table_deps() 1437 if (!md) table_deps() 1440 __dev_status(md, param); table_deps() 1442 table = dm_get_live_or_inactive_table(md, param, &srcu_idx); table_deps() 1445 dm_put_live_table(md, srcu_idx); table_deps() 1447 dm_put(md); table_deps() 1458 struct mapped_device *md; table_status() local 1462 md = find_device(param); table_status() 1463 if (!md) table_status() 1466 __dev_status(md, param); table_status() 1468 table = dm_get_live_or_inactive_table(md, param, &srcu_idx); table_status() 1471 dm_put_live_table(md, srcu_idx); table_status() 1473 dm_put(md); table_status() 1484 static int message_for_md(struct mapped_device *md, unsigned argc, char **argv, message_for_md() argument 1497 return dm_cancel_deferred_remove(md); message_for_md() 1500 r = dm_stats_message(md, argc, argv, result, maxlen); message_for_md() 1515 struct mapped_device *md; target_message() local 1523 md = find_device(param); target_message() 1524 if (!md) target_message() 1545 r = message_for_md(md, argc, argv, result, maxlen); target_message() 1549 table = dm_get_live_table(md, &srcu_idx); target_message() 1553 if (dm_deleting_md(md)) { target_message() 1570 dm_put_live_table(md, srcu_idx); target_message() 1575 __dev_status(md, param); target_message() 1586 dm_put(md); target_message() 1930 * @md: Pointer to mapped_device 1934 int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid) dm_copy_name_and_uuid() argument 1939 if (!md) dm_copy_name_and_uuid() 1943 hc = dm_get_mdptr(md); dm_copy_name_and_uuid() 1944 if (!hc || hc->md != md) { dm_copy_name_and_uuid() 160 alloc_cell(const char *name, const char *uuid, struct mapped_device *md) alloc_cell() argument
|
H A D | dm.h | 82 void dm_lock_md_type(struct mapped_device *md); 83 void dm_unlock_md_type(struct mapped_device *md); 84 void dm_set_md_type(struct mapped_device *md, unsigned type); 85 unsigned dm_get_md_type(struct mapped_device *md); 86 struct target_type *dm_get_immutable_target_type(struct mapped_device *md); 88 int dm_setup_md_queue(struct mapped_device *md); 127 int dm_deleting_md(struct mapped_device *md); 132 int dm_suspended_md(struct mapped_device *md); 137 int dm_suspended_internally_md(struct mapped_device *md); 138 void dm_internal_suspend_fast(struct mapped_device *md); 139 void dm_internal_resume_fast(struct mapped_device *md); 140 void dm_internal_suspend_noflush(struct mapped_device *md); 141 void dm_internal_resume(struct mapped_device *md); 146 int dm_test_deferred_remove_flag(struct mapped_device *md); 173 int dm_sysfs_init(struct mapped_device *md); 174 void dm_sysfs_exit(struct mapped_device *md); 175 struct kobject *dm_kobject(struct mapped_device *md); 195 void dm_destroy(struct mapped_device *md); 196 void dm_destroy_immediate(struct mapped_device *md); 197 int dm_open_count(struct mapped_device *md); 198 int dm_lock_for_deletion(struct mapped_device *md, bool mark_deferred, bool only_deferred); 199 int dm_cancel_deferred_remove(struct mapped_device *md); 200 int dm_request_based(struct mapped_device *md); 201 sector_t dm_get_size(struct mapped_device *md); 202 struct request_queue *dm_get_md_queue(struct mapped_device *md); 203 int dm_get_table_device(struct mapped_device *md, dev_t dev, fmode_t mode, 205 void dm_put_table_device(struct mapped_device *md, struct dm_dev *d); 206 struct dm_stats *dm_get_stats(struct mapped_device *md); 208 int dm_kobject_uevent(struct mapped_device *md, enum kobject_action action, 211 void dm_internal_suspend(struct mapped_device *md); 212 void dm_internal_resume(struct mapped_device *md); 214 bool dm_use_blk_mq(struct mapped_device *md); 225 struct dm_md_mempools *dm_alloc_md_mempools(struct mapped_device *md, unsigned type, 240 ssize_t dm_attr_rq_based_seq_io_merge_deadline_show(struct mapped_device *md, char *buf); 241 ssize_t dm_attr_rq_based_seq_io_merge_deadline_store(struct mapped_device *md,
|
H A D | dm-raid.c | 11 #include "md.h" 68 struct mddev md; member in struct:raid_set 163 mddev_init(&rs->md); context_alloc() 167 rs->md.raid_disks = raid_devs; context_alloc() 168 rs->md.level = raid_type->level; context_alloc() 169 rs->md.new_level = rs->md.level; context_alloc() 170 rs->md.layout = raid_type->algorithm; context_alloc() 171 rs->md.new_layout = rs->md.layout; context_alloc() 172 rs->md.delta_disks = 0; context_alloc() 173 rs->md.recovery_cp = 0; context_alloc() 180 * rs->md.persistent context_alloc() 181 * rs->md.external context_alloc() 182 * rs->md.chunk_sectors context_alloc() 183 * rs->md.new_chunk_sectors context_alloc() 184 * rs->md.dev_sectors context_alloc() 194 for (i = 0; i < rs->md.raid_disks; i++) { context_free() 228 for (i = 0; i < rs->md.raid_disks; i++, argv += 2) { dev_parms() 239 rs->dev[i].rdev.mddev = &rs->md; dev_parms() 281 list_add(&rs->dev[i].rdev.same_set, &rs->md.disks); dev_parms() 287 rs->md.external = 0; dev_parms() 288 rs->md.persistent = 1; dev_parms() 289 rs->md.major_version = 2; dev_parms() 290 } else if (rebuild && !rs->md.recovery_cp) { dev_parms() 315 * Set rs->md.bitmap_info.chunksize (which really refers to 'region size'). 358 if (region_size < rs->md.chunk_sectors) { validate_region_size() 367 rs->md.bitmap_info.chunksize = (region_size << 9); validate_region_size() 387 for (i = 0; i < rs->md.raid_disks; i++) validate_raid_redundancy() 394 if (rebuild_cnt >= rs->md.raid_disks) validate_raid_redundancy() 404 copies = raid10_md_layout_to_copies(rs->md.layout); validate_raid_redundancy() 422 if (!strcmp("near", raid10_md_layout_to_format(rs->md.layout))) { validate_raid_redundancy() 423 for (i = 0; i < rs->md.raid_disks * copies; i++) { validate_raid_redundancy() 426 d = i % rs->md.raid_disks; validate_raid_redundancy() 447 group_size = (rs->md.raid_disks / copies); validate_raid_redundancy() 448 last_group_start = (rs->md.raid_disks / group_size) - 1; validate_raid_redundancy() 450 for (i = 0; i < rs->md.raid_disks; i++) { validate_raid_redundancy() 525 rs->md.new_chunk_sectors = rs->md.chunk_sectors = value; parse_raid_params() 546 for (i = 0; i < rs->md.raid_disks; i++) { parse_raid_params() 556 rs->md.recovery_cp = MaxSector; parse_raid_params() 561 rs->md.recovery_cp = 0; parse_raid_params() 598 if (value >= rs->md.raid_disks) { parse_raid_params() 610 if (value >= rs->md.raid_disks) { parse_raid_params() 631 rs->md.bitmap_info.max_write_behind = value; parse_raid_params() 638 rs->md.bitmap_info.daemon_sleep = value; parse_raid_params() 653 if (raid5_set_cache_size(&rs->md, (int)value)) { parse_raid_params() 663 rs->md.sync_speed_min = (int)value; parse_raid_params() 670 rs->md.sync_speed_max = (int)value; parse_raid_params() 692 if (rs->md.chunk_sectors) parse_raid_params() 693 max_io_len = rs->md.chunk_sectors; parse_raid_params() 701 if (raid10_copies > rs->md.raid_disks) { parse_raid_params() 717 sector_div(sectors_per_dev, rs->md.raid_disks); parse_raid_params() 719 rs->md.layout = raid10_format_to_md_layout(raid10_format, parse_raid_params() 721 rs->md.new_layout = rs->md.layout; parse_raid_params() 724 (rs->md.raid_disks - rs->raid_type->parity_devs))) { parse_raid_params() 728 rs->md.dev_sectors = sectors_per_dev; parse_raid_params() 731 rs->md.persistent = 0; parse_raid_params() 732 rs->md.external = 1; parse_raid_params() 739 struct raid_set *rs = container_of(ws, struct raid_set, md.event_work); do_table_event() 748 return mddev_congested(&rs->md, bits); raid_is_congested() 752 * This structure is never routinely used by userspace, unlike md superblocks. 763 __le64 events; /* Incremented by md when superblock updated */ 812 struct raid_set *rs = container_of(mddev, struct raid_set, md); super_sync() 901 struct raid_set *rs = container_of(mddev, struct raid_set, md); super_init_validation() 1070 struct mddev *mddev = &rs->md; analyse_superblocks() 1165 raid456 = (rs->md.level == 4 || rs->md.level == 5 || rs->md.level == 6); configure_discard_support() 1167 for (i = 0; i < rs->md.raid_disks; i++) { configure_discard_support() 1195 ti->split_discard_bios = !!(rs->md.level == 1 || rs->md.level == 10); configure_discard_support() 1270 rs->md.sync_super = super_sync; raid_ctr() 1275 INIT_WORK(&rs->md.event_work, do_table_event); raid_ctr() 1284 mutex_lock(&rs->md.reconfig_mutex); raid_ctr() 1285 ret = md_run(&rs->md); raid_ctr() 1286 rs->md.in_sync = 0; /* Assume already marked dirty */ raid_ctr() 1287 mutex_unlock(&rs->md.reconfig_mutex); raid_ctr() 1294 if (ti->len != rs->md.array_sectors) { raid_ctr() 1302 mddev_suspend(&rs->md); raid_ctr() 1306 md_stop(&rs->md); raid_ctr() 1318 md_stop(&rs->md); raid_dtr() 1325 struct mddev *mddev = &rs->md; raid_map() 1368 DMEMIT("%s %d ", rs->raid_type->name, rs->md.raid_disks); raid_status() 1370 if (test_bit(MD_RECOVERY_RUNNING, &rs->md.recovery)) raid_status() 1371 sync = rs->md.curr_resync_completed; raid_status() 1373 sync = rs->md.recovery_cp; raid_status() 1375 if (sync >= rs->md.resync_max_sectors) { raid_status() 1380 sync = rs->md.resync_max_sectors; raid_status() 1381 } else if (test_bit(MD_RECOVERY_REQUESTED, &rs->md.recovery)) { raid_status() 1395 for (i = 0; i < rs->md.raid_disks; i++) raid_status() 1406 for (i = 0; i < rs->md.raid_disks; i++) { raid_status() 1426 (unsigned long long) rs->md.resync_max_sectors); raid_status() 1433 DMEMIT(" %s", decipher_sync_action(&rs->md)); raid_status() 1441 (strcmp(rs->md.last_sync_action, "check")) ? 0 : raid_status() 1443 atomic64_read(&rs->md.resync_mismatches)); raid_status() 1447 for (i = 0; i < rs->md.raid_disks; i++) { raid_status() 1462 raid_param_cnt, rs->md.chunk_sectors); raid_status() 1465 (rs->md.recovery_cp == MaxSector)) raid_status() 1470 for (i = 0; i < rs->md.raid_disks; i++) raid_status() 1478 rs->md.bitmap_info.daemon_sleep); raid_status() 1481 DMEMIT(" min_recovery_rate %d", rs->md.sync_speed_min); raid_status() 1484 DMEMIT(" max_recovery_rate %d", rs->md.sync_speed_max); raid_status() 1486 for (i = 0; i < rs->md.raid_disks; i++) raid_status() 1493 rs->md.bitmap_info.max_write_behind); raid_status() 1496 struct r5conf *conf = rs->md.private; raid_status() 1505 rs->md.bitmap_info.chunksize >> 9); raid_status() 1509 raid10_md_layout_to_copies(rs->md.layout)); raid_status() 1513 raid10_md_layout_to_format(rs->md.layout)); raid_status() 1515 DMEMIT(" %d", rs->md.raid_disks); raid_status() 1516 for (i = 0; i < rs->md.raid_disks; i++) { raid_status() 1533 struct mddev *mddev = &rs->md; raid_message() 1591 for (i = 0; !ret && i < rs->md.raid_disks; i++) raid_iterate_devices() 1596 rs->md.dev_sectors, raid_iterate_devices() 1605 unsigned chunk_size = rs->md.chunk_sectors << 9; raid_io_hints() 1606 struct r5conf *conf = rs->md.private; raid_io_hints() 1616 md_stop_writes(&rs->md); raid_presuspend() 1623 mddev_suspend(&rs->md); raid_postsuspend() 1634 for (i = 0; i < rs->md.raid_disks; i++) { attempt_restore_of_faulty_devices() 1673 rdev_for_each(r, &rs->md) { attempt_restore_of_faulty_devices() 1686 set_bit(MD_CHANGE_DEVS, &rs->md.flags); raid_resume() 1688 bitmap_load(&rs->md); raid_resume() 1699 clear_bit(MD_RECOVERY_FROZEN, &rs->md.recovery); raid_resume() 1700 mddev_resume(&rs->md); raid_resume()
|
H A D | dm-uevent.c | 44 struct mapped_device *md; member in struct:dm_uevent 57 static struct dm_uevent *dm_uevent_alloc(struct mapped_device *md) dm_uevent_alloc() argument 66 event->md = md; dm_uevent_alloc() 71 static struct dm_uevent *dm_build_path_uevent(struct mapped_device *md, dm_build_path_uevent() argument 80 event = dm_uevent_alloc(md); dm_build_path_uevent() 101 dm_next_uevent_seq(md))) { dm_build_path_uevent() 146 if (dm_copy_name_and_uuid(event->md, event->name, list_for_each_entry_safe() 186 struct mapped_device *md = dm_table_get_md(ti->table); dm_path_uevent() local 194 event = dm_build_path_uevent(md, ti, dm_path_uevent() 201 dm_uevent_add(md, &event->elist); dm_path_uevent()
|
H A D | raid0.c | 24 #include "md.h" 54 printk(KERN_INFO "md: RAID0 configuration for %s - %d zone%s\n", dump_zones() 58 printk(KERN_INFO "md: zone%d=[", j); dump_zones() 91 pr_debug("md/raid0:%s: looking at %s\n", rdev_for_each() 105 pr_debug("md/raid0:%s: comparing %s(%llu)" rdev_for_each() 113 pr_debug("md/raid0:%s: END\n", rdev_for_each() 122 pr_debug("md/raid0:%s: EQUAL\n", rdev_for_each() 127 pr_debug("md/raid0:%s: NOT EQUAL\n", rdev_for_each() 131 pr_debug("md/raid0:%s: ==> UNIQUE\n", 134 pr_debug("md/raid0:%s: %d zones\n", 138 pr_debug("md/raid0:%s: FINAL %d zones\n", 145 printk(KERN_ERR "md/raid0:%s: chunk_size of %d not multiple of block size %d\n", 190 "md/raid0:%s: remove inactive devices before converting to RAID0\n", rdev_for_each() 195 printk(KERN_ERR "md/raid0:%s: bad disk number %d - " rdev_for_each() 200 printk(KERN_ERR "md/raid0:%s: multiple devices for %d - " rdev_for_each() 214 printk(KERN_ERR "md/raid0:%s: too few disks (%d of %d) - " 231 pr_debug("md/raid0:%s: zone %d\n", mdname(mddev), i); 239 pr_debug("md/raid0:%s: checking %s ... nope\n", 244 pr_debug("md/raid0:%s: checking %s ..." 252 pr_debug("md/raid0:%s: (%llu) is smallest!.\n", 260 pr_debug("md/raid0:%s: zone->nb_dev: %d, sectors: %llu\n", 267 pr_debug("md/raid0:%s: current zone start: %llu\n", 272 pr_debug("md/raid0:%s: done.\n", mdname(mddev)); 342 * @mddev: the md device 415 printk(KERN_ERR "md/raid0:%s: chunk size must be set.\n", raid0_run() 457 printk(KERN_INFO "md/raid0:%s: md_size is %llu sectors.\n", 567 printk(KERN_ERR "md/raid0:%s: raid5 must be degraded! Degraded disks: %d\n", raid0_takeover_raid45() 576 printk(KERN_ERR "md/raid0:%s: raid5 must have missing parity disk!\n", rdev_for_each() 607 printk(KERN_ERR "md/raid0:%s:: Raid0 cannot takover layout: 0x%x\n", raid0_takeover_raid10() 613 printk(KERN_ERR "md/raid0:%s: Raid0 cannot takover Raid10 with odd disk number.\n", raid0_takeover_raid10() 618 printk(KERN_ERR "md/raid0:%s: All mirrors must be already degraded!\n", raid0_takeover_raid10() 646 printk(KERN_ERR "md/raid0:%s: (N - 1) mirrors drives must be already faulty!\n", raid0_takeover_raid1() 689 printk(KERN_ERR "md/raid0: %s: cannot takeover array with bitmap\n", raid0_takeover() 700 printk(KERN_ERR "md/raid0:%s: Raid can only takeover Raid5 with layout: %d\n", raid0_takeover() 750 MODULE_ALIAS("md-personality-2"); /* RAID0 */ 751 MODULE_ALIAS("md-raid0"); 752 MODULE_ALIAS("md-level-0");
|
H A D | dm-stats.c | 233 struct mapped_device *md) dm_stats_create() 310 suspend_callback(md); 332 resume_callback(md); 338 resume_callback(md); 766 static int message_stats_create(struct mapped_device *md, message_stats_create() argument 786 len = dm_get_size(md); message_stats_create() 828 id = dm_stats_create(dm_get_stats(md), start, end, step, program_id, aux_data, message_stats_create() 829 dm_internal_suspend_fast, dm_internal_resume_fast, md); message_stats_create() 838 static int message_stats_delete(struct mapped_device *md, message_stats_delete() argument 850 return dm_stats_delete(dm_get_stats(md), id); message_stats_delete() 853 static int message_stats_clear(struct mapped_device *md, message_stats_clear() argument 865 return dm_stats_clear(dm_get_stats(md), id); message_stats_clear() 868 static int message_stats_list(struct mapped_device *md, message_stats_list() argument 884 r = dm_stats_list(dm_get_stats(md), program, result, maxlen); message_stats_list() 891 static int message_stats_print(struct mapped_device *md, message_stats_print() argument 914 return dm_stats_print(dm_get_stats(md), id, idx_start, idx_len, clear, message_stats_print() 918 static int message_stats_set_aux(struct mapped_device *md, message_stats_set_aux() argument 930 return dm_stats_set_aux(dm_get_stats(md), id, argv[2]); message_stats_set_aux() 933 int dm_stats_message(struct mapped_device *md, unsigned argc, char **argv, dm_stats_message() argument 938 if (dm_request_based(md)) { dm_stats_message() 945 r = message_stats_create(md, argc, argv, result, maxlen); dm_stats_message() 947 r = message_stats_delete(md, argc, argv); dm_stats_message() 949 r = message_stats_clear(md, argc, argv); dm_stats_message() 951 r = message_stats_list(md, argc, argv, result, maxlen); dm_stats_message() 953 r = message_stats_print(md, argc, argv, false, result, maxlen); dm_stats_message() 955 r = message_stats_print(md, argc, argv, true, result, maxlen); dm_stats_message() 957 r = message_stats_set_aux(md, argc, argv); dm_stats_message() 229 dm_stats_create(struct dm_stats *stats, sector_t start, sector_t end, sector_t step, const char *program_id, const char *aux_data, void (*suspend_callback)(struct mapped_device *), void (*resume_callback)(struct mapped_device *), struct mapped_device *md) dm_stats_create() argument
|
H A D | dm-table.c | 32 struct mapped_device *md; member in struct:dm_table 184 unsigned num_targets, struct mapped_device *md) dm_table_create() 210 t->md = md; dm_table_create() 215 static void free_devices(struct list_head *devices, struct mapped_device *md) free_devices() argument 223 dm_device_name(md), dd->dm_dev->name); list_for_each_safe() 224 dm_put_table_device(md, dd->dm_dev); list_for_each_safe() 253 free_devices(&t->devices, t->md); dm_table_destroy() 298 dm_device_name(ti->table->md), bdevname(bdev, b), device_area_is_invalid() 311 dm_device_name(ti->table->md), bdevname(bdev, b), device_area_is_invalid() 324 dm_device_name(ti->table->md), device_area_is_invalid() 333 dm_device_name(ti->table->md), device_area_is_invalid() 349 struct mapped_device *md) upgrade_mode() 356 r = dm_get_table_device(md, dd->dm_dev->bdev->bd_dev, upgrade_mode() 362 dm_put_table_device(md, old_dev); upgrade_mode() 399 if ((r = dm_get_table_device(t->md, dev, mode, &dd->dm_dev))) { dm_get_device() 408 r = upgrade_mode(dd, mode, t->md); dm_get_device() 429 dm_device_name(ti->table->md), bdevname(bdev, b)); dm_set_device_limits() 437 dm_device_name(ti->table->md), bdevname(bdev, b), dm_set_device_limits() 471 dm_device_name(ti->table->md), d->name); 475 dm_put_table_device(ti->table->md, d); 656 dm_device_name(table->md), i, validate_hardware_logical_block_alignment() 675 dm_device_name(t->md), t->targets->type->name); dm_table_add_target() 685 DMERR("%s: zero-length target", dm_device_name(t->md)); dm_table_add_target() 691 DMERR("%s: %s: unknown target type", dm_device_name(t->md), dm_table_add_target() 699 dm_device_name(t->md), type); dm_table_add_target() 707 dm_device_name(t->md), type); dm_table_add_target() 714 dm_device_name(t->md), t->immutable_target_type->name); dm_table_add_target() 720 dm_device_name(t->md), tgt->type->name); dm_table_add_target() 755 dm_device_name(t->md), type); dm_table_add_target() 760 DMERR("%s: %s: %s", dm_device_name(t->md), type, tgt->error); dm_table_add_target() 837 unsigned live_md_type = dm_get_md_type(t->md); dm_table_set_type() 941 static int dm_table_alloc_md_mempools(struct dm_table *t, struct mapped_device *md) dm_table_alloc_md_mempools() argument 959 t->mempools = dm_alloc_md_mempools(md, type, t->integrity_supported, per_bio_data_size); dm_table_alloc_md_mempools() 1056 dm_device_name(t->md), 1072 static int dm_table_prealloc_integrity(struct dm_table *t, struct mapped_device *md) dm_table_prealloc_integrity() argument 1080 if (!blk_integrity_is_initialized(dm_disk(md))) { dm_table_prealloc_integrity() 1082 return blk_integrity_register(dm_disk(md), NULL); dm_table_prealloc_integrity() 1090 blk_integrity_compare(dm_disk(md), template_disk) < 0) { dm_table_prealloc_integrity() 1093 dm_device_name(t->md), dm_table_prealloc_integrity() 1123 r = dm_table_prealloc_integrity(t, t->md); dm_table_complete() 1129 r = dm_table_alloc_md_mempools(t, t->md); dm_table_complete() 1280 dm_device_name(table->md), dm_calculate_queue_limits() 1299 if (!blk_get_integrity(dm_disk(t->md))) dm_table_set_integrity() 1304 blk_integrity_register(dm_disk(t->md), dm_table_set_integrity() 1306 else if (blk_integrity_is_initialized(dm_disk(t->md))) dm_table_set_integrity() 1308 dm_device_name(t->md)); dm_table_set_integrity() 1311 dm_device_name(t->md)); dm_table_set_integrity() 1541 * md->deferred where queue settings are not needed yet. dm_table_set_restrictions() 1632 dm_device_name(t->md), ti->type->name, r); dm_table_resume_targets() 1668 dm_device_name(t->md), list_for_each_entry() 1681 return t->md; dm_table_get_md() 1687 struct mapped_device *md; dm_table_run_md_queue_async() local 1694 md = dm_table_get_md(t); dm_table_run_md_queue_async() 1695 queue = dm_get_md_queue(md); dm_table_run_md_queue_async() 183 dm_table_create(struct dm_table **result, fmode_t mode, unsigned num_targets, struct mapped_device *md) dm_table_create() argument 348 upgrade_mode(struct dm_dev_internal *dd, fmode_t new_mode, struct mapped_device *md) upgrade_mode() argument
|
H A D | dm-stats.h | 28 int dm_stats_message(struct mapped_device *md, unsigned argc, char **argv,
|
H A D | md-cluster.h | 6 #include "md.h"
|
H A D | linear.c | 24 #include "md.h" 146 printk(KERN_ERR "md/linear:%s: disk numbering problem. Aborting!\n", rdev_for_each() 168 printk(KERN_ERR "md/linear:%s: not enough drives present. Aborting!\n", 308 "md/linear:%s: make_request: Sector %llu out of bounds on " linear_make_request() 358 MODULE_ALIAS("md-personality-1"); /* LINEAR - deprecated*/ 359 MODULE_ALIAS("md-linear"); 360 MODULE_ALIAS("md-level--1");
|
H A D | md-cluster.c | 16 #include "md.h" 18 #include "md-cluster.h" 131 pr_err("md-cluster: Unable to allocate resource name for resource %s\n", name); lockres_init() 138 pr_err("md-cluster: Unable to allocate LVB for resource %s\n", name); lockres_init() 151 pr_err("md-cluster: Unable to lock NL on new lock resource %s\n", name); lockres_init() 247 pr_err("md-cluster: Cannot initialize bitmaps\n"); recover_bitmaps() 253 pr_err("md-cluster: Could not DLM lock %s: %d\n", recover_bitmaps() 259 pr_err("md-cluster: Could not copy data from bitmap %d\n", slot); recover_bitmaps() 285 pr_info("md-cluster: %s Node %d/%d down. My slot: %d. Initiating recovery.\n", recover_slot() 294 pr_warn("md-cluster: Could not create recovery thread\n"); recover_slot() 473 pr_err("md/raid1:failed to get CR on MESSAGE\n"); recv_daemon() 501 pr_err("md-cluster(%s:%d): failed to get EX on TOKEN (%d)\n", lock_comm() 532 pr_err("md-cluster: failed to get EX on MESSAGE (%d)\n", error); __sendmsg() 541 pr_err("md-cluster: failed to convert EX to CR on MESSAGE(%d)\n", __sendmsg() 549 pr_err("md-cluster: failed to convert CR to EX on ACK(%d)\n", __sendmsg() 557 pr_err("md-cluster: failed to convert EX to CR on ACK(%d)\n", __sendmsg() 652 pr_err("md-cluster: Slot allotted(%d) is greater than available slots(%d).", join() 667 pr_err("md-cluster: cannot allocate memory for recv_thread!\n"); join() 685 pr_err("md-cluster: failed to get a sync CR lock on ACK!(%d)\n", join() 689 pr_err("md-cluster: failed to get a sync CR lock on no-new-dev!(%d)\n", ret); join() 692 pr_info("md-cluster: Joined cluster %s slot %d\n", str, cinfo->slot_number); join() 745 * DLM starts the slot numbers from 1, wheras cluster-md 883 pr_warn("md-cluster(%s): Spurious cluster confirmation\n", mdname(mddev)); new_disk_ack() 921 pr_warn("md-cluster: Could not gather bitmaps from slot %d", sn); gather_bitmaps() 951 pr_warn("md-cluster: EXPERIMENTAL. Use with caution\n"); cluster_init()
|
H A D | faulty.c | 6 * fautly-device-simulator personality for md 69 #include "md.h" 369 MODULE_ALIAS("md-personality-10"); /* faulty */ 370 MODULE_ALIAS("md-faulty"); 371 MODULE_ALIAS("md-level--5");
|
H A D | bitmap.h | 123 __u8 uuid[16]; /* 8 128 bit uuid - must match md device uuid */ 126 __le64 sync_size; /* 40 the size of the md device's sync range(3) */ 134 __u8 cluster_name[64]; /* 72 cluster name to which this md belongs */ 139 * (1) This event counter is updated before the eventcounter in the md superblock 192 struct mddev *mddev; /* the md device that the bitmap is for */ 235 /* these are used only by md/bitmap */
|
H A D | md.c | 2 md.c : Multiple Devices driver for Linux 54 #include "md.h" 56 #include "md-cluster.h" 99 * or /sys/block/mdX/md/sync_speed_{min,max} 218 * Enables to iterate over all existing md arrays 379 * Generic flush handling for md 708 printk(KERN_ALERT "md: out of memory.\n"); alloc_disk_sb() 739 printk("md: super_written gets error=%d, uptodate=%d\n", super_written() 815 printk(KERN_WARNING "md: disabled device %s, could not read superblock.\n", read_disk_sb() 838 printk(KERN_INFO "md.c sb_equal(): failed to allocate memory!\n"); sb_equal() 984 printk(KERN_ERR "md: invalid raid superblock magic on %s\n", super_90_load() 1002 printk(KERN_WARNING "md: invalid superblock checksum on %s\n", super_90_load() 1024 printk(KERN_WARNING "md: %s has different UUID to %s\n", super_90_load() 1029 printk(KERN_WARNING "md: %s has same UUID" super_90_load() 1433 printk("md: invalid superblock checksum on %s\n", super_1_load() 1438 printk("md: data_size too small on %s\n", super_1_load() 1524 printk(KERN_WARNING "md: %s has strangely different" super_1_load() 1908 .name = "md-1", 1983 * profiles, register the common profile for the md device. 1987 printk(KERN_ERR "md: failed to register integrity for %s\n", 1991 printk(KERN_NOTICE "md: data integrity enabled on %s\n", mdname(mddev)); 1993 printk(KERN_ERR "md: failed to create integrity pool for %s\n", 2070 printk(KERN_WARNING "md: %s: array is limited to %d devices\n", bind_rdev_to_array() 2079 printk(KERN_INFO "md: bind<%s>\n", b); bind_rdev_to_array() 2098 printk(KERN_WARNING "md: failed to register dev-%s for %s\n", bind_rdev_to_array() 2116 printk(KERN_INFO "md: unbind<%s>\n", bdevname(rdev->bdev,b)); unbind_rdev_from_array() 2146 printk(KERN_ERR "md: could not open %s.\n", lock_rdev() 2167 printk(KERN_INFO "md: export_rdev(%s)\n", export_rdev() 2322 pr_debug("md: updating %s RAID superblock on device (in sync %d)\n", 2336 pr_debug("md: (write) %s's sb offset: %llu\n", rdev_for_each() 2349 pr_debug("md: %s (skipping faulty)\n", rdev_for_each() 3113 printk(KERN_ERR "md: could not alloc mem for new device!\n"); md_import_device() 3133 "md: %s has zero or unknown size, marking faulty!\n", md_import_device() 3144 "md: %s does not have a valid v%d.%d " md_import_device() 3152 "md: could not read %s's sb, not importing!\n", md_import_device() 3189 "md: fatal superblock inconsistency in %s" rdev_for_each_safe() 3204 "md: %s: %s: only %d devices permitted\n", rdev_for_each_safe() 3213 printk(KERN_WARNING "md: kicking non-fresh %s" rdev_for_each_safe() 3223 pr_info("md: kicking Cluster Candidate %s from array!\n", rdev_for_each_safe() 3376 printk(KERN_WARNING "md: %s: %s does not support online personality change\n", level_store() 3389 if (request_module("md-%s", clevel) != 0) level_store() 3390 request_module("md-level-%s", clevel); level_store() 3395 printk(KERN_WARNING "md: personality %s not loaded\n", clevel); level_store() 3409 printk(KERN_WARNING "md: %s: %s does not support personality takeover\n", level_store() 3430 printk(KERN_WARNING "md: %s: %s would not accept array\n", level_store() 3475 "md: cannot register extra attributes for %s\n", level_store() 3505 printk(KERN_WARNING "md: cannot register rd%d" rdev_for_each() 4923 sprintf(disk->disk_name, "md%d", unit); md_alloc() 4941 &disk_to_dev(disk)->kobj, "%s", "md"); md_alloc() 4946 printk(KERN_WARNING "md: cannot register %s/md - name in use\n", md_alloc() 5029 request_module("md-level-%d", mddev->level); md_run() 5031 request_module("md-%s", mddev->clevel); md_run() 5035 * the only valid external interface is through the md md_run() 5054 printk("md: %s: data overlaps metadata\n", rdev_for_each() 5061 printk("md: %s: metadata overlaps data\n", rdev_for_each() 5077 printk(KERN_WARNING "md: personality for level %d is not loaded!\n", 5080 printk(KERN_WARNING "md: personality for level %s is not loaded!\n", 5139 printk(KERN_ERR "md: pers->run() failed ...\n"); 5144 "md: invalid array_size %llu > default size %llu\n", 5180 "md: cannot register extra attributes for %s\n", 5255 printk(KERN_INFO "md: %s switched to read-write mode.\n", restart_array() 5351 printk(KERN_INFO "md:%s: behind writes in progress - waiting to stop.\n", mddev_detach() 5424 printk("md: %s still in use.\n",mdname(mddev)); md_set_readonly() 5487 printk("md: %s still in use.\n",mdname(mddev)); do_md_stop() 5525 printk(KERN_INFO "md: %s stopped.\n", mdname(mddev)); do_md_stop() 5559 printk(KERN_INFO "md: running: "); autorun_array() 5569 printk(KERN_WARNING "md: do_md_run() returned %d\n", err); 5592 printk(KERN_INFO "md: autorun ...\n"); autorun_devices() 5600 printk(KERN_INFO "md: considering %s ...\n", autorun_devices() 5605 printk(KERN_INFO "md: adding %s ...\n", autorun_devices() 5623 printk(KERN_INFO "md: unit number in %s is bad: %d\n", autorun_devices() 5634 "md: cannot allocate memory for md drive.\n"); autorun_devices() 5638 printk(KERN_WARNING "md: %s locked, cannot run\n", autorun_devices() 5643 "md: %s already running, cannot run %s\n", autorun_devices() 5647 printk(KERN_INFO "md: created %s\n", mdname(mddev)); autorun_devices() 5666 printk(KERN_INFO "md: ... autorun DONE.\n"); autorun_devices() 5831 "md: md_import_device returned %ld\n", add_new_disk() 5843 "md: %s has different UUID to %s\n", add_new_disk() 5876 "md: md_import_device returned %ld\n", add_new_disk() 5957 "md: error, md_import_device() returned %ld\n", add_new_disk() 5975 printk(KERN_INFO "md: nonpersistent superblock ...\n"); add_new_disk() 6023 printk(KERN_WARNING "md: cannot remove active disk %s from %s ...\n", hot_remove_disk() 6053 "md: error, md_import_device() returned %ld\n", hot_add_disk() 6067 "md: can not hot-add faulty %s disk to %s!\n", hot_add_disk() 6213 "md: superblock version %d not known\n", set_array_info() 6236 /* don't set md_minor, it is determined by which /dev/md* was set_array_info() 6409 * we don't need to do anything at the md level, the update_array_info() 6656 "md: ioctl lock interrupted, reason %d, cmd %d\n", md_ioctl() 6672 printk(KERN_WARNING "md: couldn't update" md_ioctl() 6680 "md: array %s already has disks!\n", md_ioctl() 6687 "md: array %s already initialised!\n", md_ioctl() 6694 printk(KERN_WARNING "md: couldn't set" md_ioctl() 6989 pr_debug("md: waking up MD thread %s.\n", thread->tsk->comm); md_wakeup_thread() 7380 printk(KERN_INFO "md: %s personality registered for level %d\n", register_md_personality() 7391 printk(KERN_INFO "md: %s personality unregistered\n", p->name); unregister_md_personality() 7424 err = request_module("md-cluster"); md_setup_cluster() 7426 pr_err("md-cluster module not found.\n"); md_setup_cluster() 7692 printk(KERN_INFO "md: delaying %s of %s" for_each_mddev() 7750 printk(KERN_INFO "md: %s of RAID array %s\n", desc, mdname(mddev)); 7751 printk(KERN_INFO "md: minimum _guaranteed_ speed:" 7753 printk(KERN_INFO "md: using maximum available idle IO bandwidth " 7772 printk(KERN_INFO "md: using %dk window, over a total of %lluk.\n", 7780 "md: resuming %s of %s from checkpoint.\n", 7909 printk(KERN_INFO "md: %s: %s %s.\n",mdname(mddev), desc, 7930 "md: checkpointing %s of %s.\n", 8094 printk(KERN_INFO "md: %s in immediate safe mode\n", md_check_recovery() 8848 pr_debug("md: sizeof(mdp_super_t) = %d\n", (int)sizeof(mdp_super_t)); md_geninit() 8857 md_wq = alloc_workqueue("md", WQ_MEM_RECLAIM, 0); md_init() 8865 if ((ret = register_blkdev(MD_MAJOR, "md")) < 0) md_init() 8884 unregister_blkdev(MD_MAJOR, "md"); md_init() 8937 printk(KERN_CRIT "md: md_autodetect_dev: kzalloc failed" md_autodetect_dev() 8952 printk(KERN_INFO "md: Autodetecting RAID arrays.\n"); autostart_arrays() 8973 printk(KERN_INFO "md: Scanned %d and added %d devices.\n", autostart_arrays() 8990 unregister_blkdev(MD_MAJOR,"md"); md_exit() 9039 MODULE_ALIAS("md");
|
H A D | multipath.c | 27 #include "md.h" 544 MODULE_ALIAS("md-personality-7"); /* MULTIPATH */ 545 MODULE_ALIAS("md-multipath"); 546 MODULE_ALIAS("md-level--4");
|
H A D | raid10.c | 6 * RAID-10 support for md. 28 #include "md.h" 407 "md/raid10:%s: %s: rescheduling sector %llu\n", raid10_end_read_request() 677 * @mddev: the md device 1686 "md/raid10:%s: Disk failure on %s, disabling device.\n" error() 1687 "md/raid10:%s: Operation continuing on %d devices.\n", error() 2227 "md/raid10:%s: recovery aborted" fix_recovery_read_error() 2378 "md/raid10:%s: %s: Raid device exceeded " fix_read_error() 2383 "md/raid10:%s: %s: Failing raid device\n", fix_read_error() 2474 "md/raid10:%s: read correction " fix_read_error() 2483 printk(KERN_NOTICE "md/raid10:%s: %s: failing " fix_read_error() 2514 "md/raid10:%s: unable to read back " fix_read_error() 2522 printk(KERN_NOTICE "md/raid10:%s: %s: failing " fix_read_error() 2529 "md/raid10:%s: read error corrected" fix_read_error() 2642 printk(KERN_ALERT "md/raid10:%s: %s: unrecoverable I/O" handle_read_error() 2654 "md/raid10:%s: %s: redirecting " handle_read_error() 3214 printk(KERN_INFO "md/raid10:%s: insufficient " sync_request() 3518 printk(KERN_ERR "md/raid10:%s: chunk size must be " setup_conf() 3525 printk(KERN_ERR "md/raid10:%s: unsupported raid10 layout: 0x%8x\n", setup_conf() 3585 printk(KERN_ERR "md/raid10:%s: couldn't allocate memory.\n", setup_conf() 3686 printk(KERN_ERR "md/raid10:%s: not enough operational mirrors.\n", 3728 printk(KERN_NOTICE "md/raid10:%s: not clean" 3732 "md/raid10:%s: active with %d out of %d devices\n", 3769 printk("md/raid10: offset difference not enough to continue reshape\n"); 3876 printk(KERN_ERR "md/raid10:%s: Error: degraded raid0!\n", raid10_takeover_raid0() 3917 printk(KERN_ERR "md/raid10:%s: cannot takeover raid 0" raid10_takeover() 4108 printk(KERN_ERR "md/raid10:%s: array size must be reduce before number of disks\n", 4730 MODULE_ALIAS("md-personality-9"); /* RAID10 */ 4731 MODULE_ALIAS("md-raid10"); 4732 MODULE_ALIAS("md-level-10");
|
H A D | raid1.c | 40 #include "md.h" 353 KERN_ERR "md/raid1:%s: %s: " raid1_end_read_request() 1511 "md/raid1:%s: Disk failure on %s, disabling device.\n" error() 1512 "md/raid1:%s: Operation continuing on %d devices.\n", error() 1885 printk(KERN_ALERT "md/raid1:%s: %s: unrecoverable I/O read error" fix_sync_read_error() 2174 "md/raid1:%s: read error corrected " fix_read_error() 2349 printk(KERN_ALERT "md/raid1:%s: %s: unrecoverable I/O" handle_read_error() 2368 "md/raid1:%s: redirecting sector %llu" handle_read_error() 2865 "md/raid1:%s: couldn't allocate thread\n", 2894 printk(KERN_ERR "md/raid1:%s: raid level not set to mirroring (%d)\n", run() 2899 printk(KERN_ERR "md/raid1:%s: reshape_position set but not supported\n", run() 2939 printk(KERN_NOTICE "md/raid1:%s: not clean" 2943 "md/raid1:%s: active with %d out of %d mirrors\n", 3096 "md/raid1:%s: cannot register rd%d\n", raid1_reshape() 3195 MODULE_ALIAS("md-personality-3"); /* RAID1 */ 3196 MODULE_ALIAS("md-raid1"); 3197 MODULE_ALIAS("md-level-1");
|
H A D | raid5.c | 60 #include "md.h" 193 /* md starts just after Q block */ raid6_d0() 2330 "md/raid:%s: read error corrected" raid5_end_read_request() 2353 "md/raid:%s: read error on replacement device " raid5_end_read_request() 2362 "md/raid:%s: read error not correctable " raid5_end_read_request() 2372 "md/raid:%s: read error NOT corrected!! " raid5_end_read_request() 2380 "md/raid:%s: Too many read errors, failing device %s.\n", raid5_end_read_request() 2524 "md/raid:%s: Disk failure on %s, disabling device.\n" error() 2525 "md/raid:%s: Operation continuing on %d devices.\n", error() 2851 printk(KERN_ERR "md/raid:%s: compute_blocknr: map not correct\n", compute_blocknr() 6436 printk(KERN_ERR "md/raid:%s: raid level not set to 4/5/6 (%d)\n", setup_conf() 6444 printk(KERN_ERR "md/raid:%s: layout %d not supported\n", setup_conf() 6449 printk(KERN_ERR "md/raid:%s: not enough configured devices (%d, minimum 4)\n", setup_conf() 6457 printk(KERN_ERR "md/raid:%s: invalid chunk size %d\n", setup_conf() 6547 printk(KERN_INFO "md/raid:%s: device %s operational as raid" rdev_for_each() 6579 "md/raid:%s: couldn't allocate %dkB for buffers\n", 6583 printk(KERN_INFO "md/raid:%s: allocated %dkB\n", 6601 "md/raid:%s: couldn't allocate thread.\n", 6654 printk(KERN_NOTICE "md/raid:%s: not clean" run() 6692 printk(KERN_ERR "md/raid:%s: unsupported reshape " 6705 printk(KERN_ERR "md/raid:%s: reshape_position not " 6719 printk(KERN_ERR "md/raid:%s: reshape position is" 6734 printk(KERN_ERR "md/raid:%s: in-place reshape " 6746 printk(KERN_ERR "md/raid:%s: reshape_position too early for " 6751 printk(KERN_INFO "md/raid:%s: reshape will continue\n", 6789 printk(KERN_ERR "md: cannot handle concurrent " 6832 printk(KERN_ERR "md/raid:%s: not enough operational devices" 6846 "md/raid:%s: starting dirty degraded array" 6851 "md/raid:%s: cannot start dirty degraded array.\n", 6858 printk(KERN_INFO "md/raid:%s: raid level %d active with %d out of %d" 6863 printk(KERN_ALERT "md/raid:%s: raid level %d active with %d" 6955 pr_info("md/raid456: discard support disabled due to uncertainty.\n"); rdev_for_each() 6978 printk(KERN_ALERT "md/raid:%s: failed to run raid set.\n", mdname(mddev)); 7240 printk(KERN_WARNING "md/raid:%s: reshape: not enough stripes. Needed %lu\n", check_stripe_cache() 7322 printk(KERN_ERR "md/raid:%s: array size must be reduced " 7537 printk(KERN_ERR "md/raid:%s: cannot takeover raid0 with more than one zone.\n", raid45_takeover_raid0() 7862 MODULE_ALIAS("md-personality-4"); /* RAID5 */ 7863 MODULE_ALIAS("md-raid5"); 7864 MODULE_ALIAS("md-raid4"); 7865 MODULE_ALIAS("md-level-5"); 7866 MODULE_ALIAS("md-level-4"); 7867 MODULE_ALIAS("md-personality-8"); /* RAID6 */ 7868 MODULE_ALIAS("md-raid6"); 7869 MODULE_ALIAS("md-level-6");
|
H A D | md.h | 2 md.h : kernel internal structure of the Linux MD driver 26 #include "md-cluster.h" 318 /* resync even though the same disks are shared among md-devices */ 373 int degraded; /* whether md should consider
|
H A D | raid5.h | 58 * Buffers for the md device that arrive via make_request are attached 561 /* DDF RAID6 layouts differ from md/raid6 layouts in two ways. 563 * different between the 'LEFT_*' modes of md and the "_N_*" modes 567 * Consequently we have different layouts for DDF/raid6 than md/raid6.
|
H A D | dm-verity.c | 207 struct mapped_device *md = dm_table_get_md(v->ti->table); verity_handle_err() local 237 kobject_uevent_env(&disk_to_dev(dm_disk(md))->kobj, KOBJ_CHANGE, envp); verity_handle_err()
|
H A D | bitmap.c | 30 #include "md.h" 92 pr_debug("md/bitmap: map page allocation failed, hijacking\n"); 410 printk(KERN_ALERT "md: bitmap read error: (%dB @ %llu): %d\n", read_page() 898 * bitmap_file_set_bit -- called before performing a write to the md device 973 /* this gets called when the md device is ready to unplug its underlying 1716 mddev->bitmap = NULL; /* disconnect from the md device */ bitmap_destroy()
|
H A D | dm-mpath.c | 1272 * (See drivers/md/dm.c:end_clone_bio() about why the clone requests do_end_io()
|
/linux-4.1.27/arch/ia64/kernel/ |
H A D | efi.c | 254 is_memory_available (efi_memory_desc_t *md) is_memory_available() argument 256 if (!(md->attribute & EFI_MEMORY_WB)) is_memory_available() 259 switch (md->type) { is_memory_available() 278 #define efi_md_size(md) (md->num_pages << EFI_PAGE_SHIFT) 287 efi_md_end(efi_memory_desc_t *md) efi_md_end() argument 289 return (md->phys_addr + efi_md_size(md)); efi_md_end() 293 efi_wb(efi_memory_desc_t *md) efi_wb() argument 295 return (md->attribute & EFI_MEMORY_WB); efi_wb() 299 efi_uc(efi_memory_desc_t *md) efi_uc() argument 301 return (md->attribute & EFI_MEMORY_UC); efi_uc() 351 efi_memory_desc_t *md; efi_get_pal_addr() local 361 md = p; efi_get_pal_addr() 362 if (md->type != EFI_PAL_CODE) efi_get_pal_addr() 367 "dropped @ %llx\n", md->phys_addr); efi_get_pal_addr() 375 vaddr = PAGE_OFFSET + md->phys_addr; efi_get_pal_addr() 396 if (efi_md_size(md) > IA64_GRANULE_SIZE) efi_get_pal_addr() 404 smp_processor_id(), md->phys_addr, efi_get_pal_addr() 405 md->phys_addr + efi_md_size(md), efi_get_pal_addr() 408 return __va(md->phys_addr); efi_get_pal_addr() 563 efi_memory_desc_t *md; efi_init() local 573 md = p; efi_init() 574 size = md->num_pages << EFI_PAGE_SHIFT; efi_init() 592 i, efi_md_typeattr_format(buf, sizeof(buf), md), efi_init() 593 md->phys_addr, efi_init() 594 md->phys_addr + efi_md_size(md), size, unit); efi_init() 607 efi_memory_desc_t *md; efi_enter_virtual_mode() local 616 md = p; efi_enter_virtual_mode() 617 if (md->attribute & EFI_MEMORY_RUNTIME) { efi_enter_virtual_mode() 622 if (md->attribute & EFI_MEMORY_WB) { efi_enter_virtual_mode() 623 md->virt_addr = (u64) __va(md->phys_addr); efi_enter_virtual_mode() 624 } else if (md->attribute & EFI_MEMORY_UC) { efi_enter_virtual_mode() 625 md->virt_addr = (u64) ioremap(md->phys_addr, 0); efi_enter_virtual_mode() 626 } else if (md->attribute & EFI_MEMORY_WC) { efi_enter_virtual_mode() 628 md->virt_addr = ia64_remap(md->phys_addr, efi_enter_virtual_mode() 637 md->virt_addr = (u64) ioremap(md->phys_addr, 0); efi_enter_virtual_mode() 639 } else if (md->attribute & EFI_MEMORY_WT) { efi_enter_virtual_mode() 641 md->virt_addr = ia64_remap(md->phys_addr, efi_enter_virtual_mode() 650 md->virt_addr = (u64) ioremap(md->phys_addr, 0); efi_enter_virtual_mode() 692 efi_memory_desc_t *md; efi_get_iobase() local 700 md = p; efi_get_iobase() 701 if (md->type == EFI_MEMORY_MAPPED_IO_PORT_SPACE) { efi_get_iobase() 702 if (md->attribute & EFI_MEMORY_UC) efi_get_iobase() 703 return md->phys_addr; efi_get_iobase() 712 struct kern_memdesc *md; kern_memory_descriptor() local 714 for (md = kern_memmap; md->start != ~0UL; md++) { kern_memory_descriptor() 715 if (phys_addr - md->start < (md->num_pages << EFI_PAGE_SHIFT)) kern_memory_descriptor() 716 return md; kern_memory_descriptor() 725 efi_memory_desc_t *md; efi_memory_descriptor() local 733 md = p; efi_memory_descriptor() 735 if (phys_addr - md->phys_addr < efi_md_size(md)) efi_memory_descriptor() 736 return md; efi_memory_descriptor() 745 efi_memory_desc_t *md; efi_memmap_intersects() local 756 md = p; efi_memmap_intersects() 757 if (md->phys_addr < end && efi_md_end(md) > phys_addr) efi_memmap_intersects() 766 efi_memory_desc_t *md = efi_memory_descriptor(phys_addr); efi_mem_type() local 768 if (md) efi_mem_type() 769 return md->type; efi_mem_type() 776 efi_memory_desc_t *md = efi_memory_descriptor(phys_addr); efi_mem_attributes() local 778 if (md) efi_mem_attributes() 779 return md->attribute; efi_mem_attributes() 788 efi_memory_desc_t *md = efi_memory_descriptor(phys_addr); efi_mem_attribute() local 791 if (!md) efi_mem_attribute() 798 attr = md->attribute & ~EFI_MEMORY_RUNTIME; efi_mem_attribute() 800 unsigned long md_end = efi_md_end(md); efi_mem_attribute() 805 md = efi_memory_descriptor(md_end); efi_mem_attribute() 806 if (!md || (md->attribute & ~EFI_MEMORY_RUNTIME) != attr) efi_mem_attribute() 808 } while (md); efi_mem_attribute() 816 struct kern_memdesc *md; kern_mem_attribute() local 830 md = kern_memory_descriptor(phys_addr); kern_mem_attribute() 831 if (!md) kern_mem_attribute() 834 attr = md->attribute; kern_mem_attribute() 836 unsigned long md_end = kmd_end(md); kern_mem_attribute() 841 md = kern_memory_descriptor(md_end); kern_mem_attribute() 842 if (!md || md->attribute != attr) kern_mem_attribute() 844 } while (md); kern_mem_attribute() 978 efi_memory_desc_t *md, *pmd = NULL, *check_md; find_memmap_space() local 994 for (p = efi_map_start; p < efi_map_end; pmd = md, p += efi_desc_size) { find_memmap_space() 995 md = p; find_memmap_space() 996 if (!efi_wb(md)) { find_memmap_space() 1000 efi_md_end(pmd) != md->phys_addr) { find_memmap_space() 1001 contig_low = GRANULEROUNDUP(md->phys_addr); find_memmap_space() 1002 contig_high = efi_md_end(md); find_memmap_space() 1014 if (!is_memory_available(md) || md->type == EFI_LOADER_DATA) find_memmap_space() 1018 as = max(contig_low, md->phys_addr); find_memmap_space() 1019 ae = min(contig_high, efi_md_end(md)); find_memmap_space() 1055 efi_memory_desc_t *md, *pmd = NULL, *check_md; efi_memmap_init() local 1065 for (p = efi_map_start; p < efi_map_end; pmd = md, p += efi_desc_size) { efi_memmap_init() 1066 md = p; efi_memmap_init() 1067 if (!efi_wb(md)) { efi_memmap_init() 1068 if (efi_uc(md) && efi_memmap_init() 1069 (md->type == EFI_CONVENTIONAL_MEMORY || efi_memmap_init() 1070 md->type == EFI_BOOT_SERVICES_DATA)) { efi_memmap_init() 1072 k->start = md->phys_addr; efi_memmap_init() 1073 k->num_pages = md->num_pages; efi_memmap_init() 1079 efi_md_end(pmd) != md->phys_addr) { efi_memmap_init() 1080 contig_low = GRANULEROUNDUP(md->phys_addr); efi_memmap_init() 1081 contig_high = efi_md_end(md); efi_memmap_init() 1093 if (!is_memory_available(md)) efi_memmap_init() 1100 if (md->phys_addr < contig_low) { efi_memmap_init() 1101 lim = min(efi_md_end(md), contig_low); efi_memmap_init() 1102 if (efi_uc(md)) { efi_memmap_init() 1105 kmd_end(k-1) == md->phys_addr) { efi_memmap_init() 1107 (lim - md->phys_addr) efi_memmap_init() 1111 k->start = md->phys_addr; efi_memmap_init() 1112 k->num_pages = (lim - md->phys_addr) efi_memmap_init() 1119 as = md->phys_addr; efi_memmap_init() 1121 if (efi_md_end(md) > contig_high) { efi_memmap_init() 1122 lim = max(md->phys_addr, contig_high); efi_memmap_init() 1123 if (efi_uc(md)) { efi_memmap_init() 1124 if (lim == md->phys_addr && k > kern_memmap && efi_memmap_init() 1126 kmd_end(k-1) == md->phys_addr) { efi_memmap_init() 1127 (k-1)->num_pages += md->num_pages; efi_memmap_init() 1131 k->num_pages = (efi_md_end(md) - lim) efi_memmap_init() 1138 ae = efi_md_end(md); efi_memmap_init() 1152 if (prev && kmd_end(prev) == md->phys_addr) { efi_memmap_init() 1179 efi_memory_desc_t *md; efi_initialize_iomem_resources() local 1191 md = p; efi_initialize_iomem_resources() 1193 if (md->num_pages == 0) /* should not happen */ efi_initialize_iomem_resources() 1197 switch (md->type) { efi_initialize_iomem_resources() 1208 if (md->attribute & EFI_MEMORY_WP) { efi_initialize_iomem_resources() 1211 } else if (md->attribute == EFI_MEMORY_UC) efi_initialize_iomem_resources() 1243 res->start = md->phys_addr; efi_initialize_iomem_resources() 1244 res->end = md->phys_addr + efi_md_size(md) - 1; efi_initialize_iomem_resources() 1279 efi_memory_desc_t *md; kdump_find_rsvd_region() local 1287 md = p; kdump_find_rsvd_region() 1288 if (!efi_wb(md)) kdump_find_rsvd_region() 1290 start = ALIGN(md->phys_addr, alignment); kdump_find_rsvd_region() 1291 end = efi_md_end(md); kdump_find_rsvd_region() 1320 efi_memory_desc_t *md; vmcore_find_descriptor_size() local 1329 md = p; vmcore_find_descriptor_size() 1330 if (efi_wb(md) && md->type == EFI_LOADER_DATA vmcore_find_descriptor_size() 1331 && md->phys_addr == address) { vmcore_find_descriptor_size() 1332 ret = efi_md_size(md); vmcore_find_descriptor_size()
|
/linux-4.1.27/drivers/staging/lustre/lnet/lnet/ |
H A D | Makefile | 4 lib-md.o lib-ptl.o lib-move.o module.o lo.o router.o \
|
H A D | lib-md.c | 36 * lnet/lnet/lib-md.c 47 lnet_md_unlink(lnet_libmd_t *md) lnet_md_unlink() argument 49 if ((md->md_flags & LNET_MD_FLAG_ZOMBIE) == 0) { lnet_md_unlink() 51 lnet_me_t *me = md->md_me; lnet_md_unlink() 53 md->md_flags |= LNET_MD_FLAG_ZOMBIE; lnet_md_unlink() 60 lnet_ptl_detach_md(me, md); lnet_md_unlink() 66 lnet_res_lh_invalidate(&md->md_lh); lnet_md_unlink() 69 if (md->md_refcount != 0) { lnet_md_unlink() 70 CDEBUG(D_NET, "Queueing unlink of md %p\n", md); lnet_md_unlink() 74 CDEBUG(D_NET, "Unlinking md %p\n", md); lnet_md_unlink() 76 if (md->md_eq != NULL) { lnet_md_unlink() 77 int cpt = lnet_cpt_of_cookie(md->md_lh.lh_cookie); lnet_md_unlink() 79 LASSERT(*md->md_eq->eq_refs[cpt] > 0); lnet_md_unlink() 80 (*md->md_eq->eq_refs[cpt])--; lnet_md_unlink() 83 LASSERT(!list_empty(&md->md_list)); lnet_md_unlink() 84 list_del_init(&md->md_list); lnet_md_unlink() 85 lnet_md_free_locked(md); lnet_md_unlink() 168 lnet_md_link(lnet_libmd_t *md, lnet_handle_eq_t eq_handle, int cpt) lnet_md_link() argument 172 /* NB we are passed an allocated, but inactive md. lnet_md_link() 185 md->md_eq = lnet_handle2eq(&eq_handle); lnet_md_link() 187 if (md->md_eq == NULL) lnet_md_link() 190 (*md->md_eq->eq_refs[cpt])++; lnet_md_link() 193 lnet_res_lh_initialize(container, &md->md_lh); lnet_md_link() 195 LASSERT(list_empty(&md->md_list)); lnet_md_link() 196 list_add(&md->md_list, &container->rec_active); lnet_md_link() 272 struct lnet_libmd *md; LNetMDAttach() local 287 md = lnet_md_alloc(&umd); LNetMDAttach() 288 if (md == NULL) LNetMDAttach() 291 rc = lnet_md_build(md, &umd, unlink); LNetMDAttach() 304 rc = lnet_md_link(md, umd.eq_handle, cpt); LNetMDAttach() 311 lnet_ptl_attach_md(me, md, &matches, &drops); LNetMDAttach() 313 lnet_md2handle(handle, md); LNetMDAttach() 323 lnet_md_free_locked(md); LNetMDAttach() 349 lnet_libmd_t *md; LNetMDBind() local 364 md = lnet_md_alloc(&umd); LNetMDBind() 365 if (md == NULL) LNetMDBind() 368 rc = lnet_md_build(md, &umd, unlink); LNetMDBind() 374 rc = lnet_md_link(md, umd.eq_handle, cpt); LNetMDBind() 378 lnet_md2handle(handle, md); LNetMDBind() 384 lnet_md_free_locked(md); LNetMDBind() 425 lnet_libmd_t *md; LNetMDUnlink() local 434 md = lnet_handle2md(&mdh); LNetMDUnlink() 435 if (md == NULL) { LNetMDUnlink() 440 md->md_flags |= LNET_MD_FLAG_ABORTED; LNetMDUnlink() 444 if (md->md_eq != NULL && md->md_refcount == 0) { LNetMDUnlink() 445 lnet_build_unlink_event(md, &ev); LNetMDUnlink() 446 lnet_eq_enqueue_event(md->md_eq, &ev); LNetMDUnlink() 449 lnet_md_unlink(md); LNetMDUnlink()
|
H A D | lib-me.c | 232 lnet_libmd_t *md; LNetMEUnlink() local 248 md = me->me_md; LNetMEUnlink() 249 if (md != NULL) { LNetMEUnlink() 250 md->md_flags |= LNET_MD_FLAG_ABORTED; LNetMEUnlink() 251 if (md->md_eq != NULL && md->md_refcount == 0) { LNetMEUnlink() 252 lnet_build_unlink_event(md, &ev); LNetMEUnlink() 253 lnet_eq_enqueue_event(md->md_eq, &ev); LNetMEUnlink() 271 lnet_libmd_t *md = me->me_md; lnet_me_unlink() local 274 lnet_ptl_detach_md(me, md); lnet_me_unlink() 275 lnet_md_unlink(md); lnet_me_unlink() 292 CWARN("\tMD\t= %p\n", me->md);
|
H A D | lib-move.c | 605 lnet_libmd_t *md = msg->msg_md; lnet_setpayloadbuffer() local 609 LASSERT(md != NULL); lnet_setpayloadbuffer() 614 msg->msg_niov = md->md_niov; lnet_setpayloadbuffer() 615 if ((md->md_options & LNET_MD_KIOV) != 0) lnet_setpayloadbuffer() 616 msg->msg_kiov = md->md_iov.kiov; lnet_setpayloadbuffer() 618 msg->msg_iov = md->md_iov.iov; lnet_setpayloadbuffer() 1503 lnet_libmd_t *md; lnet_parse_reply() local 1515 md = lnet_wire_handle2md(&hdr->msg.reply.dst_wmd); lnet_parse_reply() 1516 if (md == NULL || md->md_threshold == 0 || md->md_me != NULL) { lnet_parse_reply() 1519 (md == NULL) ? "invalid" : "inactive", lnet_parse_reply() 1522 if (md != NULL && md->md_me != NULL) lnet_parse_reply() 1524 md->md_me->me_portal); lnet_parse_reply() 1530 LASSERT(md->md_offset == 0); lnet_parse_reply() 1533 mlength = min_t(uint, rlength, md->md_length); lnet_parse_reply() 1536 (md->md_options & LNET_MD_TRUNCATE) == 0) { lnet_parse_reply() 1545 CDEBUG(D_NET, "%s: Reply from %s of length %d/%d into md %#llx\n", lnet_parse_reply() 1549 lnet_msg_attach_md(msg, md, 0, mlength); lnet_parse_reply() 1567 lnet_libmd_t *md; lnet_parse_ack() local 1581 md = lnet_wire_handle2md(&hdr->msg.ack.dst_wmd); lnet_parse_ack() 1582 if (md == NULL || md->md_threshold == 0 || md->md_me != NULL) { lnet_parse_ack() 1587 (md == NULL) ? "invalid" : "inactive", lnet_parse_ack() 1590 if (md != NULL && md->md_me != NULL) lnet_parse_ack() 1592 md->md_me->me_portal); lnet_parse_ack() 1598 CDEBUG(D_NET, "%s: ACK from %s into md %#llx\n", lnet_parse_ack() 1602 lnet_msg_attach_md(msg, md, 0, 0); lnet_parse_ack() 1675 CWARN(" Ptl index %d, ack md %#llx.%#llx, match bits %llu\n", lnet_print_hdr() 1686 CWARN(" Ptl index %d, return md %#llx.%#llx, match bits %llu\n", lnet_print_hdr() 1697 CWARN(" dst md %#llx.%#llx, manipulated length %d\n", lnet_print_hdr() 1704 CWARN(" dst md %#llx.%#llx, length %d\n", lnet_print_hdr() 1995 /* md won't disappear under me, since each msg lnet_recv_delayed_msg_list() 2067 struct lnet_libmd *md; LNetPut() local 2092 md = lnet_handle2md(&mdh); LNetPut() 2093 if (md == NULL || md->md_threshold == 0 || md->md_me != NULL) { LNetPut() 2096 md == NULL ? -1 : md->md_threshold); LNetPut() 2097 if (md != NULL && md->md_me != NULL) LNetPut() 2099 md->md_me->me_portal); LNetPut() 2108 lnet_msg_attach_md(msg, md, 0, 0); LNetPut() 2110 lnet_prep_send(msg, LNET_MSG_PUT, target, 0, md->md_length); LNetPut() 2122 md->md_lh.lh_cookie; LNetPut() 2149 /* The LND can DMA direct to the GET md (i.e. no REPLY msg). This lnet_create_reply_msg() 2185 CDEBUG(D_NET, "%s: Reply from %s md %p\n", lnet_create_reply_msg() 2267 struct lnet_libmd *md; LNetGet() local 2291 md = lnet_handle2md(&mdh); LNetGet() 2292 if (md == NULL || md->md_threshold == 0 || md->md_me != NULL) { LNetGet() 2295 md == NULL ? -1 : md->md_threshold); LNetGet() 2296 if (md != NULL && md->md_me != NULL) LNetGet() 2298 md->md_me->me_portal); LNetGet() 2308 lnet_msg_attach_md(msg, md, 0, 0); LNetGet() 2315 msg->msg_hdr.msg.get.sink_length = cpu_to_le32(md->md_length); LNetGet() 2321 md->md_lh.lh_cookie; LNetGet()
|
H A D | lib-ptl.c | 139 lnet_try_match_md(lnet_libmd_t *md, lnet_try_match_md() argument 146 lnet_me_t *me = md->md_me; lnet_try_match_md() 149 if (lnet_md_exhausted(md)) lnet_try_match_md() 153 if ((md->md_options & info->mi_opc) == 0) lnet_try_match_md() 171 if ((md->md_options & LNET_MD_MANAGE_REMOTE) == 0) lnet_try_match_md() 172 offset = md->md_offset; lnet_try_match_md() 176 if ((md->md_options & LNET_MD_MAX_SIZE) != 0) { lnet_try_match_md() 177 mlength = md->md_max_size; lnet_try_match_md() 178 LASSERT(md->md_offset + mlength <= md->md_length); lnet_try_match_md() 180 mlength = md->md_length - offset; lnet_try_match_md() 185 } else if ((md->md_options & LNET_MD_TRUNCATE) == 0) { lnet_try_match_md() 189 info->mi_rlength, md->md_length - offset, mlength); lnet_try_match_md() 195 CDEBUG(D_NET, "Incoming %s index %x from %s of length %d/%d into md %#llx [%d] + %d\n", lnet_try_match_md() 198 info->mi_rlength, md->md_lh.lh_cookie, md->md_niov, offset); lnet_try_match_md() 200 lnet_msg_attach_md(msg, md, offset, mlength); lnet_try_match_md() 201 md->md_offset = offset + mlength; lnet_try_match_md() 203 if (!lnet_md_exhausted(md)) lnet_try_match_md() 207 * We bumped md->md_refcount above so the MD just gets flagged lnet_try_match_md() 209 if ((md->md_flags & LNET_MD_FLAG_AUTO_UNLINK) != 0) lnet_try_match_md() 210 lnet_md_unlink(md); lnet_try_match_md() 612 lnet_ptl_detach_md(lnet_me_t *me, lnet_libmd_t *md) lnet_ptl_detach_md() argument 614 LASSERT(me->me_md == md && md->md_me == me); lnet_ptl_detach_md() 617 md->md_me = NULL; lnet_ptl_detach_md() 622 lnet_ptl_attach_md(lnet_me_t *me, lnet_libmd_t *md, lnet_ptl_attach_md() argument 633 LASSERT(md->md_refcount == 0); /* a brand new MD */ lnet_ptl_attach_md() 635 me->me_md = md; lnet_ptl_attach_md() 636 md->md_me = me; lnet_ptl_attach_md() 638 cpt = lnet_cpt_of_cookie(md->md_lh.lh_cookie); lnet_ptl_attach_md() 665 rc = lnet_try_match_md(md, &info, msg); list_for_each_entry_safe()
|
H A D | lib-msg.c | 46 lnet_build_unlink_event(lnet_libmd_t *md, lnet_event_t *ev) lnet_build_unlink_event() argument 53 lnet_md_deconstruct(md, &ev->md); lnet_build_unlink_event() 54 lnet_md2handle(&ev->md_handle, md); lnet_build_unlink_event() 308 lnet_msg_attach_md(lnet_msg_t *msg, lnet_libmd_t *md, lnet_msg_attach_md() argument 318 msg->msg_md = md; lnet_msg_attach_md() 324 md->md_refcount++; lnet_msg_attach_md() 325 if (md->md_threshold != LNET_MD_THRESH_INF) { lnet_msg_attach_md() 326 LASSERT(md->md_threshold > 0); lnet_msg_attach_md() 327 md->md_threshold--; lnet_msg_attach_md() 331 lnet_md2handle(&msg->msg_ev.md_handle, md); lnet_msg_attach_md() 332 lnet_md_deconstruct(md, &msg->msg_ev.md); lnet_msg_attach_md() 338 lnet_libmd_t *md = msg->msg_md; lnet_msg_detach_md() local 342 md->md_refcount--; lnet_msg_detach_md() 343 LASSERT(md->md_refcount >= 0); lnet_msg_detach_md() 345 unlink = lnet_md_unlinkable(md); lnet_msg_detach_md() 346 if (md->md_eq != NULL) { lnet_msg_detach_md() 349 lnet_eq_enqueue_event(md->md_eq, &msg->msg_ev); lnet_msg_detach_md() 353 lnet_md_unlink(md); lnet_msg_detach_md()
|
H A D | api-ni.c | 1657 lnet_md_t md = { NULL }; lnet_ping_target_init() local 1689 /* initialize md content */ lnet_ping_target_init() 1692 md.start = the_lnet.ln_ping_info; lnet_ping_target_init() 1693 md.length = infosz; lnet_ping_target_init() 1694 md.threshold = LNET_MD_THRESH_INF; lnet_ping_target_init() 1695 md.max_size = 0; lnet_ping_target_init() 1696 md.options = LNET_MD_OP_GET | LNET_MD_TRUNCATE | lnet_ping_target_init() 1698 md.user_ptr = NULL; lnet_ping_target_init() 1699 md.eq_handle = the_lnet.ln_ping_target_eq; lnet_ping_target_init() 1701 rc = LNetMDAttach(meh, md, lnet_ping_target_init() 1732 /* NB md could be busy; this just starts the unlink */ lnet_ping_target_fini() 1765 lnet_md_t md = { NULL }; lnet_ping() local 1799 /* initialize md content */ lnet_ping() 1800 md.start = info; lnet_ping() 1801 md.length = infosz; lnet_ping() 1802 md.threshold = 2; /*GET/REPLY*/ lnet_ping() 1803 md.max_size = 0; lnet_ping() 1804 md.options = LNET_MD_TRUNCATE; lnet_ping() 1805 md.user_ptr = NULL; lnet_ping() 1806 md.eq_handle = eqh; lnet_ping() 1808 rc = LNetMDBind(md, LNET_UNLINK, &mdh); lnet_ping()
|
H A D | router.c | 702 lnet_rc_data_t *rcd = event->md.user_ptr; lnet_router_checker_event()
|
/linux-4.1.27/arch/mips/pci/ |
H A D | msi-xlp.c | 134 struct xlp_msi_data *md = irq_data_get_irq_handler_data(d); xlp_msi_enable() local 139 spin_lock_irqsave(&md->msi_lock, flags); xlp_msi_enable() 140 md->msi_enabled_mask |= 1u << vec; xlp_msi_enable() 142 nlm_write_reg(md->lnkbase, PCIE_9XX_MSI_EN, xlp_msi_enable() 143 md->msi_enabled_mask); xlp_msi_enable() 145 nlm_write_reg(md->lnkbase, PCIE_MSI_EN, md->msi_enabled_mask); xlp_msi_enable() 146 spin_unlock_irqrestore(&md->msi_lock, flags); xlp_msi_enable() 151 struct xlp_msi_data *md = irq_data_get_irq_handler_data(d); xlp_msi_disable() local 156 spin_lock_irqsave(&md->msi_lock, flags); xlp_msi_disable() 157 md->msi_enabled_mask &= ~(1u << vec); xlp_msi_disable() 159 nlm_write_reg(md->lnkbase, PCIE_9XX_MSI_EN, xlp_msi_disable() 160 md->msi_enabled_mask); xlp_msi_disable() 162 nlm_write_reg(md->lnkbase, PCIE_MSI_EN, md->msi_enabled_mask); xlp_msi_disable() 163 spin_unlock_irqrestore(&md->msi_lock, flags); xlp_msi_disable() 168 struct xlp_msi_data *md = irq_data_get_irq_handler_data(d); xlp_msi_mask_ack() local 177 nlm_write_reg(md->lnkbase, PCIE_9XX_MSI_STATUS, 1u << vec); xlp_msi_mask_ack() 179 nlm_write_reg(md->lnkbase, PCIE_MSI_STATUS, 1u << vec); xlp_msi_mask_ack() 207 struct xlp_msi_data *md; xlp_msix_mask_ack() local 214 md = irq_data_get_irq_handler_data(d); xlp_msix_mask_ack() 224 nlm_write_reg(md->lnkbase, status_reg, 1u << bit); xlp_msix_mask_ack() 227 nlm_pic_ack(md->node->picbase, xlp_msix_mask_ack() 296 struct xlp_msi_data *md; xlp_setup_msi() local 305 md = irq_get_handler_data(xirq); xlp_setup_msi() 308 spin_lock_irqsave(&md->msi_lock, flags); xlp_setup_msi() 309 if (md->msi_alloc_mask == 0) { xlp_setup_msi() 322 msivec = fls(md->msi_alloc_mask); xlp_setup_msi() 324 spin_unlock_irqrestore(&md->msi_lock, flags); xlp_setup_msi() 327 md->msi_alloc_mask |= (1u << msivec); xlp_setup_msi() 328 spin_unlock_irqrestore(&md->msi_lock, flags); xlp_setup_msi() 403 struct xlp_msi_data *md; xlp_setup_msix() local 412 md = irq_get_handler_data(xirq); xlp_setup_msix() 415 spin_lock_irqsave(&md->msi_lock, flags); xlp_setup_msix() 417 if (md->msix_alloc_mask == 0) xlp_setup_msix() 421 t = fls(md->msix_alloc_mask); xlp_setup_msix() 423 spin_unlock_irqrestore(&md->msi_lock, flags); xlp_setup_msix() 426 md->msix_alloc_mask |= (1u << t); xlp_setup_msix() 427 spin_unlock_irqrestore(&md->msi_lock, flags); xlp_setup_msix() 469 struct xlp_msi_data *md; xlp_init_node_msi_irqs() local 476 md = kzalloc(sizeof(*md), GFP_KERNEL); xlp_init_node_msi_irqs() 477 spin_lock_init(&md->msi_lock); xlp_init_node_msi_irqs() 478 md->msi_enabled_mask = 0; xlp_init_node_msi_irqs() 479 md->msi_alloc_mask = 0; xlp_init_node_msi_irqs() 480 md->msix_alloc_mask = 0; xlp_init_node_msi_irqs() 481 md->node = nodep; xlp_init_node_msi_irqs() 482 md->lnkbase = nlm_get_pcie_base(node, link); xlp_init_node_msi_irqs() 488 irq_set_handler_data(i, md); xlp_init_node_msi_irqs() 495 nlm_write_pcie_reg(md->lnkbase, PCIE_9XX_MSIX_VECX(i + xlp_init_node_msi_irqs() 511 irq_set_handler_data(irq, md); xlp_init_node_msi_irqs() 517 struct xlp_msi_data *md; nlm_dispatch_msi() local 523 md = irq_get_handler_data(irqbase); nlm_dispatch_msi() 525 status = nlm_read_reg(md->lnkbase, PCIE_9XX_MSI_STATUS) & nlm_dispatch_msi() 526 md->msi_enabled_mask; nlm_dispatch_msi() 528 status = nlm_read_reg(md->lnkbase, PCIE_MSI_STATUS) & nlm_dispatch_msi() 529 md->msi_enabled_mask; nlm_dispatch_msi() 539 nlm_pic_ack(md->node->picbase, nlm_dispatch_msi() 542 nlm_pic_ack(md->node->picbase, PIC_IRT_PCIE_LINK_INDEX(link)); nlm_dispatch_msi() 547 struct xlp_msi_data *md; nlm_dispatch_msix() local 553 md = irq_get_handler_data(irqbase); nlm_dispatch_msix() 555 status = nlm_read_reg(md->lnkbase, PCIE_9XX_MSIX_STATUSX(link)); nlm_dispatch_msix() 557 status = nlm_read_reg(md->lnkbase, PCIE_MSIX_STATUS); nlm_dispatch_msix()
|
/linux-4.1.27/arch/arm64/kernel/ |
H A D | efi.c | 63 static int __init is_normal_ram(efi_memory_desc_t *md) is_normal_ram() argument 65 if (md->attribute & EFI_MEMORY_WB) is_normal_ram() 77 efi_memory_desc_t *md; efi_to_phys() local 79 for_each_efi_memory_desc(&memmap, md) { efi_to_phys() 80 if (!(md->attribute & EFI_MEMORY_RUNTIME)) efi_to_phys() 82 if (md->virt_addr == 0) efi_to_phys() 85 if (md->virt_addr <= addr && efi_to_phys() 86 (addr - md->virt_addr) < (md->num_pages << EFI_PAGE_SHIFT)) efi_to_phys() 87 return md->phys_addr + addr - md->virt_addr; efi_to_phys() 153 static __init int is_reserve_region(efi_memory_desc_t *md) is_reserve_region() argument 155 switch (md->type) { is_reserve_region() 165 return is_normal_ram(md); is_reserve_region() 170 efi_memory_desc_t *md; reserve_regions() local 176 for_each_efi_memory_desc(&memmap, md) { reserve_regions() 177 paddr = md->phys_addr; reserve_regions() 178 npages = md->num_pages; reserve_regions() 185 efi_md_typeattr_format(buf, sizeof(buf), md)); reserve_regions() 191 if (is_normal_ram(md)) reserve_regions() 194 if (is_reserve_region(md)) { reserve_regions() 234 efi_memory_desc_t *md; efi_virtmap_init() local 236 for_each_efi_memory_desc(&memmap, md) { efi_virtmap_init() 240 if (!(md->attribute & EFI_MEMORY_RUNTIME)) efi_virtmap_init() 242 if (md->virt_addr == 0) efi_virtmap_init() 245 paddr = md->phys_addr; efi_virtmap_init() 246 npages = md->num_pages; efi_virtmap_init() 251 md->phys_addr, (void *)md->virt_addr); efi_virtmap_init() 258 if (!is_normal_ram(md)) efi_virtmap_init() 260 else if (md->type == EFI_RUNTIME_SERVICES_CODE || efi_virtmap_init() 261 !PAGE_ALIGNED(md->phys_addr)) efi_virtmap_init() 266 create_pgd_mapping(&efi_mm, paddr, md->virt_addr, size, prot); efi_virtmap_init()
|
/linux-4.1.27/init/ |
H A D | do_mounts_md.c | 18 * When md (and any require personalities) are compiled into the kernel 22 * with md=..... 51 * the MD devices (by specifying multiple "md=" lines) 54 * md=n,0,factor,fault,device-list uses RAID0 for device n 55 * md=n,-1,factor,fault,device-list uses LINEAR for device n 56 * md=n,device-list reads a RAID superblock from the devices 75 printk(KERN_WARNING "md: Too few arguments supplied to md=.\n"); md_setup() 82 printk(KERN_WARNING "md: md=%s%d, Specified more than once. " md_setup() 87 printk(KERN_WARNING "md: md=%s%d - too many md initialisations\n", partitioned?"d":"", minor); md_setup() 97 printk(KERN_WARNING "md: Too few arguments supplied to md=.\n"); md_setup() 117 printk(KERN_INFO "md: Will configure md%d (%s) from %s, below.\n", md_setup() 143 sprintf(name, "/dev/md%s%d", partitioned?"_d":"", minor); md_setup_drive() 166 printk(KERN_WARNING "md: Unknown device name: %s\n", devname); md_setup_drive() 179 printk(KERN_INFO "md: Loading md%s%d: %s\n", md_setup_drive() 185 printk(KERN_ERR "md: open failed - cannot start " md_setup_drive() 191 "md: Ignoring md=%d, already autodetected. (Use raid=noautodetect)\n", md_setup_drive() 238 printk(KERN_WARNING "md: starting md%d failed\n", minor); md_setup_drive() 242 * boot a kernel with devfs compiled in from partitioned md md_setup_drive() 281 __setup("md=", md_setup); 291 printk(KERN_INFO "md: Waiting for all devices to be available before autodetect\n"); autodetect_raid() 292 printk(KERN_INFO "md: If you don't use raid, use raid=noautodetect\n"); autodetect_raid() 308 printk(KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=autodetect will force)\n"); md_run_setup()
|
H A D | do_mounts.c | 264 * after revalidating the disk, like partitioned md devices name_to_dev_t()
|
/linux-4.1.27/drivers/mmc/card/ |
H A D | block.c | 139 struct mmc_blk_data *md); 157 struct mmc_blk_data *md; mmc_blk_get() local 160 md = disk->private_data; mmc_blk_get() 161 if (md && md->usage == 0) mmc_blk_get() 162 md = NULL; mmc_blk_get() 163 if (md) mmc_blk_get() 164 md->usage++; mmc_blk_get() 167 return md; mmc_blk_get() 180 static void mmc_blk_put(struct mmc_blk_data *md) mmc_blk_put() argument 183 md->usage--; mmc_blk_put() 184 if (md->usage == 0) { mmc_blk_put() 185 int devidx = mmc_get_devidx(md->disk); mmc_blk_put() 186 blk_cleanup_queue(md->queue.queue); mmc_blk_put() 190 put_disk(md->disk); mmc_blk_put() 191 kfree(md); mmc_blk_put() 200 struct mmc_blk_data *md = mmc_blk_get(dev_to_disk(dev)); power_ro_lock_show() local 201 struct mmc_card *card = md->queue.card; power_ro_lock_show() 211 mmc_blk_put(md); power_ro_lock_show() 220 struct mmc_blk_data *md, *part_md; power_ro_lock_store() local 230 md = mmc_blk_get(dev_to_disk(dev)); power_ro_lock_store() 231 card = md->queue.card; power_ro_lock_store() 240 pr_err("%s: Locking boot partition ro until next power on failed: %d\n", md->disk->disk_name, ret); power_ro_lock_store() 248 md->disk->disk_name); power_ro_lock_store() 249 set_disk_ro(md->disk, 1); power_ro_lock_store() 251 list_for_each_entry(part_md, &md->part, part) power_ro_lock_store() 258 mmc_blk_put(md); power_ro_lock_store() 266 struct mmc_blk_data *md = mmc_blk_get(dev_to_disk(dev)); force_ro_show() local 270 md->read_only); force_ro_show() 271 mmc_blk_put(md); force_ro_show() 280 struct mmc_blk_data *md = mmc_blk_get(dev_to_disk(dev)); force_ro_store() local 287 set_disk_ro(dev_to_disk(dev), set || md->read_only); force_ro_store() 290 mmc_blk_put(md); force_ro_store() 296 struct mmc_blk_data *md = mmc_blk_get(bdev->bd_disk); mmc_blk_open() local 300 if (md) { mmc_blk_open() 301 if (md->usage == 2) mmc_blk_open() 305 if ((mode & FMODE_WRITE) && md->read_only) { mmc_blk_open() 306 mmc_blk_put(md); mmc_blk_open() 317 struct mmc_blk_data *md = disk->private_data; mmc_blk_release() local 320 mmc_blk_put(md); mmc_blk_release() 451 struct mmc_blk_data *md; mmc_blk_ioctl_cmd() local 473 md = mmc_blk_get(bdev->bd_disk); mmc_blk_ioctl_cmd() 474 if (!md) { mmc_blk_ioctl_cmd() 479 if (md->area_type & MMC_BLK_DATA_AREA_RPMB) mmc_blk_ioctl_cmd() 482 card = md->queue.card; mmc_blk_ioctl_cmd() 532 err = mmc_blk_part_switch(card, md); mmc_blk_ioctl_cmd() 611 mmc_blk_put(md); mmc_blk_ioctl_cmd() 647 struct mmc_blk_data *md) mmc_blk_part_switch() 652 if (main_md->part_curr == md->part_type) mmc_blk_part_switch() 659 part_config |= md->part_type; mmc_blk_part_switch() 670 main_md->part_curr = md->part_type; mmc_blk_part_switch() 1000 static int mmc_blk_reset(struct mmc_blk_data *md, struct mmc_host *host, mmc_blk_reset() argument 1005 if (md->reset_done & type) mmc_blk_reset() 1008 md->reset_done |= type; mmc_blk_reset() 1017 part_err = mmc_blk_part_switch(host->card, md); mmc_blk_reset() 1029 static inline void mmc_blk_reset_success(struct mmc_blk_data *md, int type) mmc_blk_reset_success() argument 1031 md->reset_done &= ~type; mmc_blk_reset_success() 1036 struct mmc_blk_data *md = mq->data; mmc_access_rpmb() local 1040 if (md && md->part_type == EXT_CSD_PART_CONFIG_ACC_RPMB) mmc_access_rpmb() 1048 struct mmc_blk_data *md = mq->data; mmc_blk_issue_discard_rq() local 1049 struct mmc_card *card = md->queue.card; mmc_blk_issue_discard_rq() 1080 if (err == -EIO && !mmc_blk_reset(md, card->host, type)) mmc_blk_issue_discard_rq() 1083 mmc_blk_reset_success(md, type); mmc_blk_issue_discard_rq() 1092 struct mmc_blk_data *md = mq->data; mmc_blk_issue_secdiscard_rq() local 1093 struct mmc_card *card = md->queue.card; mmc_blk_issue_secdiscard_rq() 1146 if (err && !mmc_blk_reset(md, card->host, type)) mmc_blk_issue_secdiscard_rq() 1149 mmc_blk_reset_success(md, type); mmc_blk_issue_secdiscard_rq() 1158 struct mmc_blk_data *md = mq->data; mmc_blk_issue_flush() local 1159 struct mmc_card *card = md->queue.card; mmc_blk_issue_flush() 1365 struct mmc_blk_data *md = mq->data; mmc_blk_rw_rq_prep() local 1378 (md->flags & MMC_BLK_REL_WR); mmc_blk_rw_rq_prep() 1480 if ((md->flags & MMC_BLK_CMD23) && mmc_op_multi(brq->cmd.opcode) && mmc_blk_rw_rq_prep() 1542 struct mmc_blk_data *md = mq->data; mmc_blk_prep_packed_list() local 1551 if (!(md->flags & MMC_BLK_PACKED_CMD)) mmc_blk_prep_packed_list() 1562 (md->flags & MMC_BLK_REL_WR) && !en_rel_wr) mmc_blk_prep_packed_list() 1611 (md->flags & MMC_BLK_REL_WR) && !en_rel_wr) mmc_blk_prep_packed_list() 1652 struct mmc_blk_data *md = mq->data; mmc_blk_packed_hdr_wrq_prep() local 1675 do_rel_wr = mmc_req_rel_wr(prq) && (md->flags & MMC_BLK_REL_WR); mmc_blk_packed_hdr_wrq_prep() 1729 static int mmc_blk_cmd_err(struct mmc_blk_data *md, struct mmc_card *card, mmc_blk_cmd_err() argument 1832 struct mmc_blk_data *md = mq->data; mmc_blk_issue_rw_rq() local 1833 struct mmc_card *card = md->queue.card; mmc_blk_issue_rw_rq() 1890 mmc_blk_reset_success(md, type); mmc_blk_issue_rw_rq() 1914 ret = mmc_blk_cmd_err(md, card, brq, req, ret); mmc_blk_issue_rw_rq() 1915 if (mmc_blk_reset(md, card->host, type)) mmc_blk_issue_rw_rq() 1925 if (!mmc_blk_reset(md, card->host, type)) mmc_blk_issue_rw_rq() 1931 err = mmc_blk_reset(md, card->host, type); mmc_blk_issue_rw_rq() 2023 struct mmc_blk_data *md = mq->data; mmc_blk_issue_rq() local 2024 struct mmc_card *card = md->queue.card; mmc_blk_issue_rq() 2033 ret = mmc_blk_part_switch(card, md); mmc_blk_issue_rq() 2091 struct mmc_blk_data *md; mmc_blk_alloc_req() local 2099 md = kzalloc(sizeof(struct mmc_blk_data), GFP_KERNEL); mmc_blk_alloc_req() 2100 if (!md) { mmc_blk_alloc_req() 2112 md->name_idx = find_first_zero_bit(name_use, max_devices); mmc_blk_alloc_req() 2113 __set_bit(md->name_idx, name_use); mmc_blk_alloc_req() 2115 md->name_idx = ((struct mmc_blk_data *) mmc_blk_alloc_req() 2118 md->area_type = area_type; mmc_blk_alloc_req() 2124 md->read_only = mmc_blk_readonly(card); mmc_blk_alloc_req() 2126 md->disk = alloc_disk(perdev_minors); mmc_blk_alloc_req() 2127 if (md->disk == NULL) { mmc_blk_alloc_req() 2132 spin_lock_init(&md->lock); mmc_blk_alloc_req() 2133 INIT_LIST_HEAD(&md->part); mmc_blk_alloc_req() 2134 md->usage = 1; mmc_blk_alloc_req() 2136 ret = mmc_init_queue(&md->queue, card, &md->lock, subname); mmc_blk_alloc_req() 2140 md->queue.issue_fn = mmc_blk_issue_rq; mmc_blk_alloc_req() 2141 md->queue.data = md; mmc_blk_alloc_req() 2143 md->disk->major = MMC_BLOCK_MAJOR; mmc_blk_alloc_req() 2144 md->disk->first_minor = devidx * perdev_minors; mmc_blk_alloc_req() 2145 md->disk->fops = &mmc_bdops; mmc_blk_alloc_req() 2146 md->disk->private_data = md; mmc_blk_alloc_req() 2147 md->disk->queue = md->queue.queue; mmc_blk_alloc_req() 2148 md->disk->driverfs_dev = parent; mmc_blk_alloc_req() 2149 set_disk_ro(md->disk, md->read_only || default_ro); mmc_blk_alloc_req() 2151 md->disk->flags |= GENHD_FL_NO_PART_SCAN; mmc_blk_alloc_req() 2165 snprintf(md->disk->disk_name, sizeof(md->disk->disk_name), mmc_blk_alloc_req() 2166 "mmcblk%u%s", md->name_idx, subname ? subname : ""); mmc_blk_alloc_req() 2169 blk_queue_logical_block_size(md->queue.queue, mmc_blk_alloc_req() 2172 blk_queue_logical_block_size(md->queue.queue, 512); mmc_blk_alloc_req() 2174 set_capacity(md->disk, size); mmc_blk_alloc_req() 2180 md->flags |= MMC_BLK_CMD23; mmc_blk_alloc_req() 2184 md->flags & MMC_BLK_CMD23 && mmc_blk_alloc_req() 2187 md->flags |= MMC_BLK_REL_WR; mmc_blk_alloc_req() 2188 blk_queue_flush(md->queue.queue, REQ_FLUSH | REQ_FUA); mmc_blk_alloc_req() 2193 (md->flags & MMC_BLK_CMD23) && mmc_blk_alloc_req() 2195 if (!mmc_packed_init(&md->queue, card)) mmc_blk_alloc_req() 2196 md->flags |= MMC_BLK_PACKED_CMD; mmc_blk_alloc_req() 2199 return md; mmc_blk_alloc_req() 2202 put_disk(md->disk); mmc_blk_alloc_req() 2204 kfree(md); mmc_blk_alloc_req() 2232 struct mmc_blk_data *md, mmc_blk_alloc_part() 2242 part_md = mmc_blk_alloc_req(card, disk_to_dev(md->disk), size, default_ro, mmc_blk_alloc_part() 2247 list_add(&part_md->part, &md->part); mmc_blk_alloc_part() 2263 static int mmc_blk_alloc_parts(struct mmc_card *card, struct mmc_blk_data *md) mmc_blk_alloc_parts() argument 2272 ret = mmc_blk_alloc_part(card, md, mmc_blk_alloc_parts() 2286 static void mmc_blk_remove_req(struct mmc_blk_data *md) mmc_blk_remove_req() argument 2290 if (md) { mmc_blk_remove_req() 2296 card = md->queue.card; mmc_blk_remove_req() 2297 mmc_cleanup_queue(&md->queue); mmc_blk_remove_req() 2298 if (md->flags & MMC_BLK_PACKED_CMD) mmc_blk_remove_req() 2299 mmc_packed_clean(&md->queue); mmc_blk_remove_req() 2300 if (md->disk->flags & GENHD_FL_UP) { mmc_blk_remove_req() 2301 device_remove_file(disk_to_dev(md->disk), &md->force_ro); mmc_blk_remove_req() 2302 if ((md->area_type & MMC_BLK_DATA_AREA_BOOT) && mmc_blk_remove_req() 2304 device_remove_file(disk_to_dev(md->disk), mmc_blk_remove_req() 2305 &md->power_ro_lock); mmc_blk_remove_req() 2307 del_gendisk(md->disk); mmc_blk_remove_req() 2309 mmc_blk_put(md); mmc_blk_remove_req() 2314 struct mmc_blk_data *md) mmc_blk_remove_parts() 2319 __clear_bit(md->name_idx, name_use); mmc_blk_remove_parts() 2320 list_for_each_safe(pos, q, &md->part) { mmc_blk_remove_parts() 2327 static int mmc_add_disk(struct mmc_blk_data *md) mmc_add_disk() argument 2330 struct mmc_card *card = md->queue.card; mmc_add_disk() 2332 add_disk(md->disk); mmc_add_disk() 2333 md->force_ro.show = force_ro_show; mmc_add_disk() 2334 md->force_ro.store = force_ro_store; mmc_add_disk() 2335 sysfs_attr_init(&md->force_ro.attr); mmc_add_disk() 2336 md->force_ro.attr.name = "force_ro"; mmc_add_disk() 2337 md->force_ro.attr.mode = S_IRUGO | S_IWUSR; mmc_add_disk() 2338 ret = device_create_file(disk_to_dev(md->disk), &md->force_ro); mmc_add_disk() 2342 if ((md->area_type & MMC_BLK_DATA_AREA_BOOT) && mmc_add_disk() 2351 md->power_ro_lock.show = power_ro_lock_show; mmc_add_disk() 2352 md->power_ro_lock.store = power_ro_lock_store; mmc_add_disk() 2353 sysfs_attr_init(&md->power_ro_lock.attr); mmc_add_disk() 2354 md->power_ro_lock.attr.mode = mode; mmc_add_disk() 2355 md->power_ro_lock.attr.name = mmc_add_disk() 2357 ret = device_create_file(disk_to_dev(md->disk), mmc_add_disk() 2358 &md->power_ro_lock); mmc_add_disk() 2365 device_remove_file(disk_to_dev(md->disk), &md->force_ro); mmc_add_disk() 2367 del_gendisk(md->disk); mmc_add_disk() 2440 struct mmc_blk_data *md, *part_md; mmc_blk_probe() local 2451 md = mmc_blk_alloc(card); mmc_blk_probe() 2452 if (IS_ERR(md)) mmc_blk_probe() 2453 return PTR_ERR(md); mmc_blk_probe() 2455 string_get_size((u64)get_capacity(md->disk), 512, STRING_UNITS_2, mmc_blk_probe() 2458 md->disk->disk_name, mmc_card_id(card), mmc_card_name(card), mmc_blk_probe() 2459 cap_str, md->read_only ? "(ro)" : ""); mmc_blk_probe() 2461 if (mmc_blk_alloc_parts(card, md)) mmc_blk_probe() 2464 dev_set_drvdata(&card->dev, md); mmc_blk_probe() 2466 if (mmc_add_disk(md)) mmc_blk_probe() 2469 list_for_each_entry(part_md, &md->part, part) { mmc_blk_probe() 2489 mmc_blk_remove_parts(card, md); mmc_blk_probe() 2490 mmc_blk_remove_req(md); mmc_blk_probe() 2496 struct mmc_blk_data *md = dev_get_drvdata(&card->dev); mmc_blk_remove() local 2498 mmc_blk_remove_parts(card, md); mmc_blk_remove() 2501 mmc_blk_part_switch(card, md); mmc_blk_remove() 2506 mmc_blk_remove_req(md); mmc_blk_remove() 2513 struct mmc_blk_data *md = dev_get_drvdata(&card->dev); _mmc_blk_suspend() local 2515 if (md) { _mmc_blk_suspend() 2516 mmc_queue_suspend(&md->queue); _mmc_blk_suspend() 2517 list_for_each_entry(part_md, &md->part, part) { _mmc_blk_suspend() 2540 struct mmc_blk_data *md = dev_get_drvdata(dev); mmc_blk_resume() local 2542 if (md) { mmc_blk_resume() 2547 md->part_curr = md->part_type; mmc_blk_resume() 2548 mmc_queue_resume(&md->queue); mmc_blk_resume() 2549 list_for_each_entry(part_md, &md->part, part) { mmc_blk_resume() 646 mmc_blk_part_switch(struct mmc_card *card, struct mmc_blk_data *md) mmc_blk_part_switch() argument 2231 mmc_blk_alloc_part(struct mmc_card *card, struct mmc_blk_data *md, unsigned int part_type, sector_t size, bool default_ro, const char *subname, int area_type) mmc_blk_alloc_part() argument 2313 mmc_blk_remove_parts(struct mmc_card *card, struct mmc_blk_data *md) mmc_blk_remove_parts() argument
|
/linux-4.1.27/drivers/staging/lustre/lustre/ptlrpc/ |
H A D | pers.c | 46 void ptlrpc_fill_bulk_md(lnet_md_t *md, struct ptlrpc_bulk_desc *desc, ptlrpc_fill_bulk_md() argument 53 LASSERT(!(md->options & (LNET_MD_IOVEC | LNET_MD_KIOV | ptlrpc_fill_bulk_md() 56 md->options |= LNET_MD_KIOV; ptlrpc_fill_bulk_md() 57 md->length = max(0, desc->bd_iov_count - mdidx * LNET_MAX_IOV); ptlrpc_fill_bulk_md() 58 md->length = min_t(unsigned int, LNET_MAX_IOV, md->length); ptlrpc_fill_bulk_md() 60 md->start = &desc->bd_enc_iov[mdidx * LNET_MAX_IOV]; ptlrpc_fill_bulk_md() 62 md->start = &desc->bd_iov[mdidx * LNET_MAX_IOV]; ptlrpc_fill_bulk_md()
|
H A D | niobuf.c | 56 lnet_md_t md; ptl_send_buf() local 61 md.start = base; ptl_send_buf() 62 md.length = len; ptl_send_buf() 63 md.threshold = (ack == LNET_ACK_REQ) ? 2 : 1; ptl_send_buf() 64 md.options = PTLRPC_MD_OPTIONS; ptl_send_buf() 65 md.user_ptr = cbid; ptl_send_buf() 66 md.eq_handle = ptlrpc_eq_h; ptl_send_buf() 75 rc = LNetMDBind(md, LNET_UNLINK, mdh); ptl_send_buf() 124 lnet_md_t md; ptlrpc_register_bulk() local 169 md.user_ptr = &desc->bd_cbid; ptlrpc_register_bulk() 170 md.eq_handle = ptlrpc_eq_h; ptlrpc_register_bulk() 171 md.threshold = 1; /* PUT or GET */ ptlrpc_register_bulk() 174 md.options = PTLRPC_MD_OPTIONS | ptlrpc_register_bulk() 177 ptlrpc_fill_bulk_md(&md, desc, posted_md); ptlrpc_register_bulk() 189 rc = LNetMDAttach(me_h, md, LNET_UNLINK, ptlrpc_register_bulk() 688 lnet_md_t md; ptlrpc_register_rqbd() local 712 md.start = rqbd->rqbd_buffer; ptlrpc_register_rqbd() 713 md.length = service->srv_buf_size; ptlrpc_register_rqbd() 714 md.max_size = service->srv_max_req_size; ptlrpc_register_rqbd() 715 md.threshold = LNET_MD_THRESH_INF; ptlrpc_register_rqbd() 716 md.options = PTLRPC_MD_OPTIONS | LNET_MD_OP_PUT | LNET_MD_MAX_SIZE; ptlrpc_register_rqbd() 717 md.user_ptr = &rqbd->rqbd_cbid; ptlrpc_register_rqbd() 718 md.eq_handle = ptlrpc_eq_h; ptlrpc_register_rqbd() 720 rc = LNetMDAttach(me_h, md, LNET_UNLINK, &rqbd->rqbd_md_h); ptlrpc_register_rqbd()
|
H A D | events.c | 56 struct ptlrpc_cb_id *cbid = ev->md.user_ptr; request_out_callback() 89 struct ptlrpc_cb_id *cbid = ev->md.user_ptr; reply_in_callback() 95 LASSERT(ev->md.start == req->rq_repbuf); reply_in_callback() 99 LASSERT((ev->md.options & LNET_MD_MANAGE_REMOTE) != 0); reply_in_callback() 175 struct ptlrpc_cb_id *cbid = ev->md.user_ptr; client_bulk_callback() 284 struct ptlrpc_cb_id *cbid = ev->md.user_ptr; request_in_callback() 292 LASSERT((char *)ev->md.start >= rqbd->rqbd_buffer); request_in_callback() 293 LASSERT((char *)ev->md.start + ev->offset + ev->mlength <= request_in_callback() 327 req->rq_reqbuf = ev->md.start + ev->offset; request_in_callback() 383 struct ptlrpc_cb_id *cbid = ev->md.user_ptr; reply_out_callback() 421 struct ptlrpc_cb_id *cbid = ev->md.user_ptr; ptlrpc_master_callback()
|
H A D | ptlrpc_internal.h | 233 void ptlrpc_fill_bulk_md(lnet_md_t *md, struct ptlrpc_bulk_desc *desc,
|
/linux-4.1.27/arch/x86/platform/efi/ |
H A D | efi.c | 131 efi_memory_desc_t *md = p; do_add_efi_memmap() local 132 unsigned long long start = md->phys_addr; do_add_efi_memmap() 133 unsigned long long size = md->num_pages << EFI_PAGE_SHIFT; do_add_efi_memmap() 136 switch (md->type) { do_add_efi_memmap() 142 if (md->attribute & EFI_MEMORY_WB) do_add_efi_memmap() 204 efi_memory_desc_t *md; print_efi_memmap() local 213 md = p; print_efi_memmap() 215 i, efi_md_typeattr_format(buf, sizeof(buf), md), print_efi_memmap() 216 md->phys_addr, print_efi_memmap() 217 md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT), print_efi_memmap() 218 (md->num_pages >> (20 - EFI_PAGE_SHIFT))); print_efi_memmap() 511 void __init efi_set_executable(efi_memory_desc_t *md, bool executable) efi_set_executable() argument 515 addr = md->virt_addr; efi_set_executable() 516 npages = md->num_pages; efi_set_executable() 528 efi_memory_desc_t *md; runtime_code_page_mkexec() local 533 md = p; runtime_code_page_mkexec() 535 if (md->type != EFI_RUNTIME_SERVICES_CODE) runtime_code_page_mkexec() 538 efi_set_executable(md, true); runtime_code_page_mkexec() 552 void __init old_map_region(efi_memory_desc_t *md) old_map_region() argument 558 start_pfn = PFN_DOWN(md->phys_addr); old_map_region() 559 size = md->num_pages << PAGE_SHIFT; old_map_region() 560 end = md->phys_addr + size; old_map_region() 564 va = __va(md->phys_addr); old_map_region() 566 if (!(md->attribute & EFI_MEMORY_WB)) old_map_region() 569 va = efi_ioremap(md->phys_addr, size, old_map_region() 570 md->type, md->attribute); old_map_region() 572 md->virt_addr = (u64) (unsigned long) va; old_map_region() 575 (unsigned long long)md->phys_addr); old_map_region() 582 efi_memory_desc_t *md, *prev_md = NULL; efi_merge_regions() local 586 md = p; efi_merge_regions() 589 prev_md = md; efi_merge_regions() 593 if (prev_md->type != md->type || efi_merge_regions() 594 prev_md->attribute != md->attribute) { efi_merge_regions() 595 prev_md = md; efi_merge_regions() 601 if (md->phys_addr == (prev_md->phys_addr + prev_size)) { efi_merge_regions() 602 prev_md->num_pages += md->num_pages; efi_merge_regions() 603 md->type = EFI_RESERVED_TYPE; efi_merge_regions() 604 md->attribute = 0; efi_merge_regions() 607 prev_md = md; efi_merge_regions() 611 static void __init get_systab_virt_addr(efi_memory_desc_t *md) get_systab_virt_addr() argument 616 size = md->num_pages << EFI_PAGE_SHIFT; get_systab_virt_addr() 617 end = md->phys_addr + size; get_systab_virt_addr() 619 if (md->phys_addr <= systab && systab < end) { get_systab_virt_addr() 620 systab += md->virt_addr - md->phys_addr; get_systab_virt_addr() 628 efi_memory_desc_t *md; save_runtime_map() local 636 md = p; save_runtime_map() 638 if (!(md->attribute & EFI_MEMORY_RUNTIME) || save_runtime_map() 639 (md->type == EFI_BOOT_SERVICES_CODE) || save_runtime_map() 640 (md->type == EFI_BOOT_SERVICES_DATA)) save_runtime_map() 647 memcpy(q + count * memmap.desc_size, md, memmap.desc_size); save_runtime_map() 753 efi_memory_desc_t *md; efi_map_regions() local 757 md = p; efi_map_regions() 758 if (!(md->attribute & EFI_MEMORY_RUNTIME)) { efi_map_regions() 760 if (md->type != EFI_BOOT_SERVICES_CODE && efi_map_regions() 761 md->type != EFI_BOOT_SERVICES_DATA) efi_map_regions() 766 efi_map_region(md); efi_map_regions() 767 get_systab_virt_addr(md); efi_map_regions() 778 memcpy(new_memmap + (*count * memmap.desc_size), md, efi_map_regions() 791 efi_memory_desc_t *md; kexec_enter_virtual_mode() local 811 md = p; kexec_enter_virtual_mode() 812 efi_map_region_fixed(md); /* FIXME: add error handling */ kexec_enter_virtual_mode() 813 get_systab_virt_addr(md); kexec_enter_virtual_mode() 978 efi_memory_desc_t *md; efi_mem_type() local 985 md = p; efi_mem_type() 986 if ((md->phys_addr <= phys_addr) && efi_mem_type() 987 (phys_addr < (md->phys_addr + efi_mem_type() 988 (md->num_pages << EFI_PAGE_SHIFT)))) efi_mem_type() 989 return md->type; efi_mem_type() 996 efi_memory_desc_t *md; efi_mem_attributes() local 1003 md = p; efi_mem_attributes() 1004 if ((md->phys_addr <= phys_addr) && efi_mem_attributes() 1005 (phys_addr < (md->phys_addr + efi_mem_attributes() 1006 (md->num_pages << EFI_PAGE_SHIFT)))) efi_mem_attributes() 1007 return md->attribute; efi_mem_attributes()
|
H A D | efi_64.c | 63 efi_memory_desc_t *md; early_code_mapping_set_exec() local 71 md = p; early_code_mapping_set_exec() 72 if (md->type == EFI_RUNTIME_SERVICES_CODE || early_code_mapping_set_exec() 73 md->type == EFI_BOOT_SERVICES_CODE) early_code_mapping_set_exec() 74 efi_set_executable(md, executable); early_code_mapping_set_exec() 204 static void __init __map_region(efi_memory_desc_t *md, u64 va) __map_region() argument 209 if (!(md->attribute & EFI_MEMORY_WB)) __map_region() 212 if (kernel_map_pages_in_pgd(pgd, md->phys_addr, va, md->num_pages, pf)) __map_region() 214 md->phys_addr, va); __map_region() 217 void __init efi_map_region(efi_memory_desc_t *md) efi_map_region() argument 219 unsigned long size = md->num_pages << PAGE_SHIFT; efi_map_region() 220 u64 pa = md->phys_addr; efi_map_region() 223 return old_map_region(md); efi_map_region() 230 __map_region(md, md->phys_addr); efi_map_region() 238 md->virt_addr = md->phys_addr; efi_map_region() 264 __map_region(md, efi_va); efi_map_region() 265 md->virt_addr = efi_va; efi_map_region() 270 * md->virt_addr is the original virtual address which had been mapped in kexec 273 void __init efi_map_region_fixed(efi_memory_desc_t *md) efi_map_region_fixed() argument 275 __map_region(md, md->virt_addr); efi_map_region_fixed()
|
H A D | quirks.c | 146 efi_memory_desc_t *md = p; efi_reserve_boot_services() local 147 u64 start = md->phys_addr; efi_reserve_boot_services() 148 u64 size = md->num_pages << EFI_PAGE_SHIFT; efi_reserve_boot_services() 150 if (md->type != EFI_BOOT_SERVICES_CODE && efi_reserve_boot_services() 151 md->type != EFI_BOOT_SERVICES_DATA) efi_reserve_boot_services() 164 md->num_pages = 0; efi_reserve_boot_services() 177 efi_memory_desc_t *md = p; efi_free_boot_services() local 178 unsigned long long start = md->phys_addr; efi_free_boot_services() 179 unsigned long long size = md->num_pages << EFI_PAGE_SHIFT; efi_free_boot_services() 181 if (md->type != EFI_BOOT_SERVICES_CODE && efi_free_boot_services() 182 md->type != EFI_BOOT_SERVICES_DATA) efi_free_boot_services()
|
H A D | efi_32.c | 51 void __init efi_map_region(efi_memory_desc_t *md) efi_map_region() argument 53 old_map_region(md); efi_map_region() 56 void __init efi_map_region_fixed(efi_memory_desc_t *md) {} parse_efi_setup() argument
|
/linux-4.1.27/drivers/video/fbdev/matrox/ |
H A D | matroxfb_maven.c | 134 static int* get_ctrl_ptr(struct maven_data* md, int idx) { get_ctrl_ptr() argument 135 return (int*)((char*)(md->primary_head) + maven_controls[idx].control); get_ctrl_ptr() 339 static unsigned char maven_compute_deflicker (const struct maven_data* md) { maven_compute_deflicker() argument 342 df = (md->version == MGATVO_B?0x40:0x00); maven_compute_deflicker() 343 switch (md->primary_head->altout.tvo_params.deflicker) { maven_compute_deflicker() 357 static void maven_compute_bwlevel (const struct maven_data* md, maven_compute_bwlevel() argument 359 const int b = md->primary_head->altout.tvo_params.brightness + BLMIN; maven_compute_bwlevel() 360 const int c = md->primary_head->altout.tvo_params.contrast; maven_compute_bwlevel() 366 static const struct maven_gamma* maven_compute_gamma (const struct maven_data* md) { maven_compute_gamma() argument 367 return maven_gamma + md->primary_head->altout.tvo_params.gamma; maven_compute_gamma() 371 static void maven_init_TVdata(const struct maven_data* md, struct mavenregs* data) { maven_init_TVdata() argument 476 struct matrox_fb_info *minfo = md->primary_head; maven_init_TVdata() 484 data->regs[0x93] = maven_compute_deflicker(md); maven_init_TVdata() 489 g = maven_compute_gamma(md); maven_init_TVdata() 504 maven_compute_bwlevel (md, &bl, &wl); maven_init_TVdata() 754 static inline int maven_compute_timming(struct maven_data* md, maven_compute_timming() argument 759 struct matrox_fb_info *minfo = md->primary_head; maven_compute_timming() 769 maven_init_TVdata(md, m); maven_compute_timming() 806 if (md->version == MGATVO_B) { maven_compute_timming() 988 static int maven_program_timming(struct maven_data* md, maven_program_timming() argument 990 struct i2c_client *c = md->client; maven_program_timming() 1026 static inline int maven_resync(struct maven_data* md) { maven_resync() argument 1027 struct i2c_client *c = md->client; maven_resync() 1032 static int maven_get_queryctrl (struct maven_data* md, maven_get_queryctrl() argument 1054 static int maven_set_control (struct maven_data* md, maven_set_control() argument 1064 if (p->value == *get_ctrl_ptr(md, i)) return 0; maven_set_control() 1075 *get_ctrl_ptr(md, i) = p->value; maven_set_control() 1082 maven_compute_bwlevel(md, &blacklevel, &whitelevel); maven_set_control() 1085 maven_set_reg_pair(md->client, 0x0e, blacklevel); maven_set_control() 1086 maven_set_reg_pair(md->client, 0x1e, whitelevel); maven_set_control() 1091 maven_set_reg(md->client, 0x20, p->value); maven_set_control() 1092 maven_set_reg(md->client, 0x22, p->value); maven_set_control() 1097 maven_set_reg(md->client, 0x25, p->value); maven_set_control() 1103 g = maven_compute_gamma(md); maven_set_control() 1104 maven_set_reg(md->client, 0x83, g->reg83); maven_set_control() 1105 maven_set_reg(md->client, 0x84, g->reg84); maven_set_control() 1106 maven_set_reg(md->client, 0x85, g->reg85); maven_set_control() 1107 maven_set_reg(md->client, 0x86, g->reg86); maven_set_control() 1108 maven_set_reg(md->client, 0x87, g->reg87); maven_set_control() 1109 maven_set_reg(md->client, 0x88, g->reg88); maven_set_control() 1110 maven_set_reg(md->client, 0x89, g->reg89); maven_set_control() 1111 maven_set_reg(md->client, 0x8a, g->reg8a); maven_set_control() 1112 maven_set_reg(md->client, 0x8b, g->reg8b); maven_set_control() 1118 = maven_get_reg(md->client, 0x8d); maven_set_control() 1121 maven_set_reg(md->client, 0x8d, val); maven_set_control() 1126 maven_set_reg(md->client, 0x93, maven_compute_deflicker(md)); maven_set_control() 1135 static int maven_get_control (struct maven_data* md, maven_get_control() argument 1141 p->value = *get_ctrl_ptr(md, i); maven_get_control() 1147 static int maven_out_compute(void* md, struct my_timming* mt) { maven_out_compute() argument 1148 #define mdinfo ((struct maven_data*)md) maven_out_compute() 1150 return maven_compute_timming(md, mt, &minfo->hw.maven); maven_out_compute() 1155 static int maven_out_program(void* md) { maven_out_program() argument 1156 #define mdinfo ((struct maven_data*)md) maven_out_program() 1158 return maven_program_timming(md, &minfo->hw.maven); maven_out_program() 1163 static int maven_out_start(void* md) { maven_out_start() argument 1164 return maven_resync(md); maven_out_start() 1167 static int maven_out_verify_mode(void* md, u_int32_t arg) { maven_out_verify_mode() argument 1177 static int maven_out_get_queryctrl(void* md, struct v4l2_queryctrl* p) { maven_out_get_queryctrl() argument 1178 return maven_get_queryctrl(md, p); maven_out_get_queryctrl() 1181 static int maven_out_get_ctrl(void* md, struct v4l2_control* p) { maven_out_get_ctrl() argument 1182 return maven_get_control(md, p); maven_out_get_ctrl() 1185 static int maven_out_set_ctrl(void* md, struct v4l2_control* p) { maven_out_set_ctrl() argument 1186 return maven_set_control(md, p); maven_out_set_ctrl() 1201 struct maven_data* md = i2c_get_clientdata(clnt); maven_init_client() local 1206 md->primary_head = minfo; maven_init_client() 1207 md->client = clnt; maven_init_client() 1211 minfo->outputs[1].data = md; maven_init_client() 1215 md->version = MGATVO_B; maven_init_client() 1218 md->version = MGATVO_C; maven_init_client() 1227 *get_ctrl_ptr(md, i) = maven_controls[i].desc.default_value; maven_init_client() 1235 struct maven_data* md = i2c_get_clientdata(clnt); maven_shutdown_client() local 1237 if (md->primary_head) { maven_shutdown_client() 1238 struct matrox_fb_info *minfo = md->primary_head; maven_shutdown_client() 1246 md->primary_head = NULL; maven_shutdown_client()
|
H A D | matroxfb_g450.c | 141 static int g450_query_ctrl(void* md, struct v4l2_queryctrl *p) { g450_query_ctrl() argument 162 static int g450_set_ctrl(void* md, struct v4l2_control *p) { g450_set_ctrl() argument 164 struct matrox_fb_info *minfo = md; g450_set_ctrl() 216 static int g450_get_ctrl(void* md, struct v4l2_control *p) { g450_get_ctrl() argument 218 struct matrox_fb_info *minfo = md; g450_get_ctrl() 520 static int matroxfb_g450_compute(void* md, struct my_timming* mt) { matroxfb_g450_compute() argument 521 struct matrox_fb_info *minfo = md; matroxfb_g450_compute() 558 static int matroxfb_g450_program(void* md) { matroxfb_g450_program() argument 559 struct matrox_fb_info *minfo = md; matroxfb_g450_program() 567 static int matroxfb_g450_verify_mode(void* md, u_int32_t arg) { matroxfb_g450_verify_mode() argument 577 static int g450_dvi_compute(void* md, struct my_timming* mt) { g450_dvi_compute() argument 578 struct matrox_fb_info *minfo = md; g450_dvi_compute()
|
/linux-4.1.27/drivers/staging/lustre/include/linux/lnet/ |
H A D | lib-lnet.h | 87 static inline int lnet_md_exhausted(lnet_libmd_t *md) lnet_md_exhausted() argument 89 return (md->md_threshold == 0 || lnet_md_exhausted() 90 ((md->md_options & LNET_MD_MAX_SIZE) != 0 && lnet_md_exhausted() 91 md->md_offset + md->md_max_size > md->md_length)); lnet_md_exhausted() 94 static inline int lnet_md_unlinkable(lnet_libmd_t *md) lnet_md_unlinkable() argument 96 /* Should unlink md when its refcount is 0 and either: lnet_md_unlinkable() 97 * - md has been flagged for deletion (by auto unlink or lnet_md_unlinkable() 98 * LNetM[DE]Unlink, in the latter case md may not be exhausted). lnet_md_unlinkable() 99 * - auto unlink is on and md is exhausted. lnet_md_unlinkable() 101 if (md->md_refcount != 0) lnet_md_unlinkable() 104 if ((md->md_flags & LNET_MD_FLAG_ZOMBIE) != 0) lnet_md_unlinkable() 107 return ((md->md_flags & LNET_MD_FLAG_AUTO_UNLINK) != 0 && lnet_md_unlinkable() 108 lnet_md_exhausted(md)); lnet_md_unlinkable() 254 lnet_libmd_t *md; lnet_md_alloc() local 259 md = (lnet_libmd_t *)lnet_freelist_alloc(&rec->rec_freelist); lnet_md_alloc() 262 if (md != NULL) lnet_md_alloc() 263 INIT_LIST_HEAD(&md->md_list); lnet_md_alloc() 265 return md; lnet_md_alloc() 269 lnet_md_free_locked(lnet_libmd_t *md) lnet_md_free_locked() argument 275 lnet_freelist_free(&rec->rec_freelist, md); lnet_md_free_locked() 279 lnet_md_free(lnet_libmd_t *md) lnet_md_free() argument 282 lnet_md_free_locked(md); lnet_md_free() 382 lnet_libmd_t *md; lnet_md_alloc() local 395 LIBCFS_ALLOC(md, size); lnet_md_alloc() 397 if (md != NULL) { lnet_md_alloc() 399 md->md_options = umd->options; lnet_md_alloc() 400 md->md_niov = niov; lnet_md_alloc() 401 INIT_LIST_HEAD(&md->md_list); lnet_md_alloc() 404 return md; lnet_md_alloc() 408 lnet_md_free(lnet_libmd_t *md) lnet_md_free() argument 413 if ((md->md_options & LNET_MD_KIOV) != 0) lnet_md_free() 414 size = offsetof(lnet_libmd_t, md_iov.kiov[md->md_niov]); lnet_md_free() 416 size = offsetof(lnet_libmd_t, md_iov.iov[md->md_niov]); lnet_md_free() 418 LIBCFS_FREE(md, size); lnet_md_free() 459 #define lnet_md_free_locked(md) lnet_md_free(md) 502 lnet_md2handle(lnet_handle_md_t *handle, lnet_libmd_t *md) lnet_md2handle() argument 504 handle->cookie = md->md_lh.lh_cookie; lnet_md2handle() 666 void lnet_msg_attach_md(lnet_msg_t *msg, lnet_libmd_t *md, 669 void lnet_build_unlink_event(lnet_libmd_t *md, lnet_event_t *ev); 724 void lnet_ptl_attach_md(lnet_me_t *me, lnet_libmd_t *md, 726 void lnet_ptl_detach_md(lnet_me_t *me, lnet_libmd_t *md); 828 void lnet_md_unlink(lnet_libmd_t *md);
|
H A D | types.h | 83 * object type codes ('eq' for event queue, 'md' for memory descriptor, and 423 * been processed. In particular, the threshold field in md will 426 lnet_md_t md; member in struct:__anon9909
|
/linux-4.1.27/drivers/input/touchscreen/ |
H A D | cyttsp4_core.c | 719 static void cyttsp4_report_slot_liftoff(struct cyttsp4_mt_data *md, cyttsp4_report_slot_liftoff() argument 724 if (md->num_prv_tch == 0) cyttsp4_report_slot_liftoff() 728 input_mt_slot(md->input, t); cyttsp4_report_slot_liftoff() 729 input_mt_report_slot_state(md->input, cyttsp4_report_slot_liftoff() 734 static void cyttsp4_lift_all(struct cyttsp4_mt_data *md) cyttsp4_lift_all() argument 736 if (!md->si) cyttsp4_lift_all() 739 if (md->num_prv_tch != 0) { cyttsp4_lift_all() 740 cyttsp4_report_slot_liftoff(md, cyttsp4_lift_all() 741 md->si->si_ofs.tch_abs[CY_TCH_T].max); cyttsp4_lift_all() 742 input_sync(md->input); cyttsp4_lift_all() 743 md->num_prv_tch = 0; cyttsp4_lift_all() 747 static void cyttsp4_get_touch_axis(struct cyttsp4_mt_data *md, cyttsp4_get_touch_axis() argument 754 dev_vdbg(&md->input->dev, cyttsp4_get_touch_axis() 765 dev_vdbg(&md->input->dev, cyttsp4_get_touch_axis() 772 static void cyttsp4_get_touch(struct cyttsp4_mt_data *md, cyttsp4_get_touch() argument 775 struct device *dev = &md->input->dev; cyttsp4_get_touch() 776 struct cyttsp4_sysinfo *si = md->si; cyttsp4_get_touch() 782 cyttsp4_get_touch_axis(md, &touch->abs[abs], cyttsp4_get_touch() 792 if (md->pdata->flags & CY_FLAG_FLIP) { cyttsp4_get_touch() 800 if (md->pdata->flags & CY_FLAG_INV_X) { cyttsp4_get_touch() 802 touch->abs[CY_TCH_X] = md->si->si_ofs.max_y - cyttsp4_get_touch() 805 touch->abs[CY_TCH_X] = md->si->si_ofs.max_x - cyttsp4_get_touch() 808 if (md->pdata->flags & CY_FLAG_INV_Y) { cyttsp4_get_touch() 810 touch->abs[CY_TCH_Y] = md->si->si_ofs.max_x - cyttsp4_get_touch() 813 touch->abs[CY_TCH_Y] = md->si->si_ofs.max_y - cyttsp4_get_touch() 819 md->pdata->flags & CY_FLAG_INV_X ? "true" : "false", cyttsp4_get_touch() 820 md->pdata->flags & CY_FLAG_INV_Y ? "true" : "false", cyttsp4_get_touch() 839 static void cyttsp4_get_mt_touches(struct cyttsp4_mt_data *md, int num_cur_tch) cyttsp4_get_mt_touches() argument 841 struct device *dev = &md->input->dev; cyttsp4_get_mt_touches() 842 struct cyttsp4_sysinfo *si = md->si; cyttsp4_get_mt_touches() 850 cyttsp4_get_touch(md, &tch, si->xy_data + cyttsp4_get_mt_touches() 852 if ((tch.abs[CY_TCH_T] < md->pdata->frmwrk->abs cyttsp4_get_mt_touches() 854 (tch.abs[CY_TCH_T] > md->pdata->frmwrk->abs cyttsp4_get_mt_touches() 858 md->pdata->frmwrk->abs[(CY_ABS_ID_OST * cyttsp4_get_mt_touches() 864 sig = md->pdata->frmwrk->abs cyttsp4_get_mt_touches() 867 t = tch.abs[CY_TCH_T] - md->pdata->frmwrk->abs cyttsp4_get_mt_touches() 874 input_mt_slot(md->input, t); cyttsp4_get_mt_touches() 875 input_mt_report_slot_state(md->input, MT_TOOL_FINGER, cyttsp4_get_mt_touches() 882 sig = md->pdata->frmwrk->abs[((CY_ABS_X_OST + j) * cyttsp4_get_mt_touches() 885 input_report_abs(md->input, sig, cyttsp4_get_mt_touches() 900 sig = md->pdata->frmwrk->abs cyttsp4_get_mt_touches() 904 input_report_abs(md->input, sig, cyttsp4_get_mt_touches() 931 cyttsp4_final_sync(md->input, si->si_ofs.tch_abs[CY_TCH_T].max, ids); cyttsp4_get_mt_touches() 933 md->num_prv_tch = num_cur_tch; cyttsp4_get_mt_touches() 941 struct cyttsp4_mt_data *md = &cd->md; cyttsp4_xy_worker() local 942 struct device *dev = &md->input->dev; cyttsp4_xy_worker() 943 struct cyttsp4_sysinfo *si = md->si; cyttsp4_xy_worker() 1015 cyttsp4_get_mt_touches(md, num_cur_tch); cyttsp4_xy_worker() 1017 cyttsp4_lift_all(md); cyttsp4_xy_worker() 1028 struct cyttsp4_mt_data *md = &cd->md; cyttsp4_mt_attention() local 1031 if (!md->si) cyttsp4_mt_attention() 1034 mutex_lock(&md->report_lock); cyttsp4_mt_attention() 1035 if (!md->is_suspended) { cyttsp4_mt_attention() 1042 mutex_unlock(&md->report_lock); cyttsp4_mt_attention() 1636 cyttsp4_lift_all(&cd->md); cyttsp4_startup_() 1823 struct cyttsp4_mt_data *md = &cd->md; cyttsp4_core_suspend() local 1826 md->is_suspended = true; cyttsp4_core_suspend() 1839 struct cyttsp4_mt_data *md = &cd->md; cyttsp4_core_resume() local 1842 md->is_suspended = false; cyttsp4_core_resume() 1868 struct cyttsp4_mt_data *md = input_get_drvdata(input); cyttsp4_mt_close() local 1869 mutex_lock(&md->report_lock); cyttsp4_mt_close() 1870 if (!md->is_suspended) cyttsp4_mt_close() 1872 mutex_unlock(&md->report_lock); cyttsp4_mt_close() 1879 struct cyttsp4_mt_data *md = &cd->md; cyttsp4_setup_input_device() local 1887 __set_bit(EV_ABS, md->input->evbit); cyttsp4_setup_input_device() 1888 __set_bit(EV_REL, md->input->evbit); cyttsp4_setup_input_device() 1889 __set_bit(EV_KEY, md->input->evbit); cyttsp4_setup_input_device() 1891 max_x_tmp = md->si->si_ofs.max_x; cyttsp4_setup_input_device() 1892 max_y_tmp = md->si->si_ofs.max_y; cyttsp4_setup_input_device() 1895 if (md->pdata->flags & CY_FLAG_FLIP) { cyttsp4_setup_input_device() 1902 max_p = md->si->si_ofs.max_p; cyttsp4_setup_input_device() 1905 for (i = 0; i < (md->pdata->frmwrk->size / CY_NUM_ABS_SET); i++) { cyttsp4_setup_input_device() 1906 signal = md->pdata->frmwrk->abs cyttsp4_setup_input_device() 1909 __set_bit(signal, md->input->absbit); cyttsp4_setup_input_device() 1910 min = md->pdata->frmwrk->abs cyttsp4_setup_input_device() 1912 max = md->pdata->frmwrk->abs cyttsp4_setup_input_device() 1924 input_set_abs_params(md->input, signal, min, max, cyttsp4_setup_input_device() 1925 md->pdata->frmwrk->abs cyttsp4_setup_input_device() 1927 md->pdata->frmwrk->abs cyttsp4_setup_input_device() 1932 (md->si->si_ofs.tch_rec_size < cyttsp4_setup_input_device() 1938 input_mt_init_slots(md->input, md->si->si_ofs.tch_abs[CY_TCH_T].max, cyttsp4_setup_input_device() 1940 rc = input_register_device(md->input); cyttsp4_setup_input_device() 1950 struct cyttsp4_mt_data *md = &cd->md; cyttsp4_mt_probe() local 1954 mutex_init(&md->report_lock); cyttsp4_mt_probe() 1955 md->pdata = pdata; cyttsp4_mt_probe() 1959 md->input = input_allocate_device(); cyttsp4_mt_probe() 1960 if (md->input == NULL) { cyttsp4_mt_probe() 1967 md->input->name = pdata->inp_dev_name; cyttsp4_mt_probe() 1968 scnprintf(md->phys, sizeof(md->phys)-1, "%s", dev_name(dev)); cyttsp4_mt_probe() 1969 md->input->phys = md->phys; cyttsp4_mt_probe() 1970 md->input->id.bustype = cd->bus_ops->bustype; cyttsp4_mt_probe() 1971 md->input->dev.parent = dev; cyttsp4_mt_probe() 1972 md->input->open = cyttsp4_mt_open; cyttsp4_mt_probe() 1973 md->input->close = cyttsp4_mt_close; cyttsp4_mt_probe() 1974 input_set_drvdata(md->input, md); cyttsp4_mt_probe() 1977 md->si = &cd->sysinfo; cyttsp4_mt_probe() 1978 if (!md->si) { cyttsp4_mt_probe() 1980 __func__, md->si); cyttsp4_mt_probe() 1991 input_free_device(md->input); cyttsp4_mt_probe() 1993 input_set_drvdata(md->input, NULL); cyttsp4_mt_probe() 2126 static void cyttsp4_mt_release(struct cyttsp4_mt_data *md) cyttsp4_mt_release() argument 2128 input_unregister_device(md->input); cyttsp4_mt_release() 2129 input_set_drvdata(md->input, NULL); cyttsp4_mt_release() 2136 cyttsp4_mt_release(&cd->md); cyttsp4_remove()
|
H A D | cyttsp4_core.h | 360 struct cyttsp4_mt_data md; member in struct:cyttsp4
|
/linux-4.1.27/drivers/w1/ |
H A D | w1.c | 84 struct w1_master *md = dev_to_w1_master(dev); w1_master_release() local 86 dev_dbg(dev, "%s: Releasing %s.\n", __func__, md->name); w1_master_release() 87 memset(md, 0, sizeof(struct w1_master) + sizeof(struct w1_bus_master)); w1_master_release() 88 kfree(md); w1_master_release() 223 struct w1_master *md = dev_to_w1_master(dev); w1_master_attribute_show_name() local 226 mutex_lock(&md->mutex); w1_master_attribute_show_name() 227 count = sprintf(buf, "%s\n", md->name); w1_master_attribute_show_name() 228 mutex_unlock(&md->mutex); w1_master_attribute_show_name() 238 struct w1_master *md = dev_to_w1_master(dev); w1_master_attribute_store_search() local 245 mutex_lock(&md->mutex); w1_master_attribute_store_search() 246 md->search_count = tmp; w1_master_attribute_store_search() 247 mutex_unlock(&md->mutex); w1_master_attribute_store_search() 250 wake_up_process(md->thread); w1_master_attribute_store_search() 259 struct w1_master *md = dev_to_w1_master(dev); w1_master_attribute_show_search() local 262 mutex_lock(&md->mutex); w1_master_attribute_show_search() 263 count = sprintf(buf, "%d\n", md->search_count); w1_master_attribute_show_search() 264 mutex_unlock(&md->mutex); w1_master_attribute_show_search() 274 struct w1_master *md = dev_to_w1_master(dev); w1_master_attribute_store_pullup() local 281 mutex_lock(&md->mutex); w1_master_attribute_store_pullup() 282 md->enable_pullup = tmp; w1_master_attribute_store_pullup() 283 mutex_unlock(&md->mutex); w1_master_attribute_store_pullup() 292 struct w1_master *md = dev_to_w1_master(dev); w1_master_attribute_show_pullup() local 295 mutex_lock(&md->mutex); w1_master_attribute_show_pullup() 296 count = sprintf(buf, "%d\n", md->enable_pullup); w1_master_attribute_show_pullup() 297 mutex_unlock(&md->mutex); w1_master_attribute_show_pullup() 304 struct w1_master *md = dev_to_w1_master(dev); w1_master_attribute_show_pointer() local 307 mutex_lock(&md->mutex); w1_master_attribute_show_pointer() 308 count = sprintf(buf, "0x%p\n", md->bus_master); w1_master_attribute_show_pointer() 309 mutex_unlock(&md->mutex); w1_master_attribute_show_pointer() 324 struct w1_master *md = dev_to_w1_master(dev); w1_master_attribute_store_max_slave_count() local 329 mutex_lock(&md->mutex); w1_master_attribute_store_max_slave_count() 330 md->max_slave_count = tmp; w1_master_attribute_store_max_slave_count() 332 clear_bit(W1_WARN_MAX_COUNT, &md->flags); w1_master_attribute_store_max_slave_count() 333 mutex_unlock(&md->mutex); w1_master_attribute_store_max_slave_count() 340 struct w1_master *md = dev_to_w1_master(dev); w1_master_attribute_show_max_slave_count() local 343 mutex_lock(&md->mutex); w1_master_attribute_show_max_slave_count() 344 count = sprintf(buf, "%d\n", md->max_slave_count); w1_master_attribute_show_max_slave_count() 345 mutex_unlock(&md->mutex); w1_master_attribute_show_max_slave_count() 351 struct w1_master *md = dev_to_w1_master(dev); w1_master_attribute_show_attempts() local 354 mutex_lock(&md->mutex); w1_master_attribute_show_attempts() 355 count = sprintf(buf, "%lu\n", md->attempts); w1_master_attribute_show_attempts() 356 mutex_unlock(&md->mutex); w1_master_attribute_show_attempts() 362 struct w1_master *md = dev_to_w1_master(dev); w1_master_attribute_show_slave_count() local 365 mutex_lock(&md->mutex); w1_master_attribute_show_slave_count() 366 count = sprintf(buf, "%d\n", md->slave_count); w1_master_attribute_show_slave_count() 367 mutex_unlock(&md->mutex); w1_master_attribute_show_slave_count() 374 struct w1_master *md = dev_to_w1_master(dev); w1_master_attribute_show_slaves() local 379 mutex_lock(&md->list_mutex); w1_master_attribute_show_slaves() 381 list_for_each_safe(ent, n, &md->slist) { w1_master_attribute_show_slaves() 389 mutex_unlock(&md->list_mutex); w1_master_attribute_show_slaves() 466 struct w1_master *md = dev_to_w1_master(dev); w1_master_attribute_store_add() local 474 mutex_lock(&md->mutex); w1_master_attribute_store_add() 475 sl = w1_slave_search_device(md, &rn); w1_master_attribute_store_add() 484 w1_attach_slave_device(md, &rn); w1_master_attribute_store_add() 486 mutex_unlock(&md->mutex); w1_master_attribute_store_add() 504 struct w1_master *md = dev_to_w1_master(dev); w1_master_attribute_store_remove() local 512 mutex_lock(&md->mutex); w1_master_attribute_store_remove() 513 sl = w1_slave_search_device(md, &rn); w1_master_attribute_store_remove() 524 mutex_unlock(&md->mutex); w1_master_attribute_store_remove() 583 struct w1_master *md = NULL; w1_uevent() local 589 md = container_of(dev, struct w1_master, dev); w1_uevent() 591 name = md->name; w1_uevent()
|
/linux-4.1.27/block/partitions/ |
H A D | mac.c | 41 struct mac_driver_desc *md; mac_partition() local 44 md = read_part_sector(state, 0, §); mac_partition() 45 if (!md) mac_partition() 47 if (be16_to_cpu(md->signature) != MAC_DRIVER_MAGIC) { mac_partition() 51 secsize = be16_to_cpu(md->block_size); mac_partition()
|
H A D | efi.c | 713 /* If this is a RAID volume, tell md */ efi_partition()
|
/linux-4.1.27/drivers/net/ethernet/tile/ |
H A D | tilegx.c | 360 struct mpipe_data *md = &mpipe_data[instance]; tile_net_provide_buffer() local 382 gxio_mpipe_push_buffer(&md->context, md->first_buffer_stack + kind, tile_net_provide_buffer() 410 struct mpipe_data *md = &mpipe_data[instance]; tile_net_pop_all_buffers() local 414 (tile_io_addr_t)gxio_mpipe_pop_buffer(&md->context, tile_net_pop_all_buffers() 462 struct mpipe_data *md = &mpipe_data[instance]; tile_tx_timestamp() local 467 gxio_mpipe_get_timestamp(&md->context, &ts); tile_tx_timestamp() 588 struct mpipe_data *md = &mpipe_data[instance]; tile_net_handle_packet() local 589 struct net_device *dev = md->tile_net_devs_for_channel[idesc->channel]; tile_net_handle_packet() 657 struct mpipe_data *md; tile_net_poll() local 682 md = &mpipe_data[instance]; tile_net_poll() 685 &md->context, info->mpipe[instance].iqueue.ring); tile_net_poll() 822 struct mpipe_data *md = container_of(ptp, struct mpipe_data, caps); ptp_mpipe_adjfreq() local 823 mutex_lock(&md->ptp_lock); ptp_mpipe_adjfreq() 824 if (gxio_mpipe_adjust_timestamp_freq(&md->context, ppb)) ptp_mpipe_adjfreq() 826 mutex_unlock(&md->ptp_lock); ptp_mpipe_adjfreq() 833 struct mpipe_data *md = container_of(ptp, struct mpipe_data, caps); ptp_mpipe_adjtime() local 834 mutex_lock(&md->ptp_lock); ptp_mpipe_adjtime() 835 if (gxio_mpipe_adjust_timestamp(&md->context, delta)) ptp_mpipe_adjtime() 837 mutex_unlock(&md->ptp_lock); ptp_mpipe_adjtime() 845 struct mpipe_data *md = container_of(ptp, struct mpipe_data, caps); ptp_mpipe_gettime() local 846 mutex_lock(&md->ptp_lock); ptp_mpipe_gettime() 847 if (gxio_mpipe_get_timestamp(&md->context, ts)) ptp_mpipe_gettime() 849 mutex_unlock(&md->ptp_lock); ptp_mpipe_gettime() 857 struct mpipe_data *md = container_of(ptp, struct mpipe_data, caps); ptp_mpipe_settime() local 858 mutex_lock(&md->ptp_lock); ptp_mpipe_settime() 859 if (gxio_mpipe_set_timestamp(&md->context, ts)) ptp_mpipe_settime() 861 mutex_unlock(&md->ptp_lock); ptp_mpipe_settime() 886 static void register_ptp_clock(struct net_device *dev, struct mpipe_data *md) register_ptp_clock() argument 891 gxio_mpipe_set_timestamp(&md->context, &ts); register_ptp_clock() 893 mutex_init(&md->ptp_lock); register_ptp_clock() 894 md->caps = ptp_mpipe_caps; register_ptp_clock() 895 md->ptp_clock = ptp_clock_register(&md->caps, NULL); register_ptp_clock() 896 if (IS_ERR(md->ptp_clock)) register_ptp_clock() 898 PTR_ERR(md->ptp_clock)); register_ptp_clock() 927 struct mpipe_data *md = &mpipe_data[instance]; tile_net_update() local 933 gxio_mpipe_rules_init(&rules, &md->context); tile_net_update() 936 if (md->tile_net_devs_for_channel[channel] == NULL) tile_net_update() 940 gxio_mpipe_rules_begin(&rules, md->first_bucket, tile_net_update() 941 md->num_buckets, NULL); tile_net_update() 962 (void *)(long)(md->ingress_irq), 1); for_each_online_cpu() 988 (void *)(long)(md->ingress_irq), 1); 1003 struct mpipe_data *md = &mpipe_data[instance]; create_buffer_stack() local 1005 int stack_idx = md->first_buffer_stack + kind; create_buffer_stack() 1012 md->buffer_stack_bytes[kind] = create_buffer_stack() 1015 va = alloc_pages_exact(md->buffer_stack_bytes[kind], GFP_KERNEL); create_buffer_stack() 1019 md->buffer_stack_bytes[kind], kind); create_buffer_stack() 1024 rc = gxio_mpipe_init_buffer_stack(&md->context, stack_idx, create_buffer_stack() 1026 md->buffer_stack_bytes[kind], 0); create_buffer_stack() 1030 free_pages_exact(va, md->buffer_stack_bytes[kind]); create_buffer_stack() 1034 md->buffer_stack_vas[kind] = va; create_buffer_stack() 1036 rc = gxio_mpipe_register_client_memory(&md->context, stack_idx, create_buffer_stack() 1067 struct mpipe_data *md = &mpipe_data[instance]; init_buffer_stacks() local 1070 rc = gxio_mpipe_alloc_buffer_stacks(&md->context, num_kinds, 0, 0); init_buffer_stacks() 1077 md->first_buffer_stack = rc; init_buffer_stacks() 1107 struct mpipe_data *md = &mpipe_data[instance]; alloc_percpu_mpipe_resources() local 1137 &md->context, ring++, addr, alloc_percpu_mpipe_resources() 1158 struct mpipe_data *md = &mpipe_data[instance]; init_notif_group_and_buckets() local 1161 rc = gxio_mpipe_alloc_notif_groups(&md->context, 1, 0, 0); init_notif_group_and_buckets() 1171 md->num_buckets = 256; init_notif_group_and_buckets() 1173 md->num_buckets = 16; init_notif_group_and_buckets() 1176 rc = gxio_mpipe_alloc_buckets(&md->context, md->num_buckets, 0, 0); init_notif_group_and_buckets() 1182 md->first_bucket = rc; init_notif_group_and_buckets() 1186 &md->context, group, ring, network_cpus_count, init_notif_group_and_buckets() 1187 md->first_bucket, md->num_buckets, init_notif_group_and_buckets() 1207 struct mpipe_data *md = &mpipe_data[instance]; tile_net_setup_interrupts() local 1209 irq = md->ingress_irq; tile_net_setup_interrupts() 1229 md->ingress_irq = irq; tile_net_setup_interrupts() 1235 gxio_mpipe_request_notif_ring_interrupt(&md->context, for_each_online_cpu() 1248 struct mpipe_data *md = &mpipe_data[instance]; tile_net_init_mpipe_fail() local 1252 if (md->buffer_stack_vas[kind] != NULL) { tile_net_init_mpipe_fail() 1254 md->first_buffer_stack + tile_net_init_mpipe_fail() 1260 gxio_mpipe_destroy(&md->context); tile_net_init_mpipe_fail() 1275 if (md->buffer_stack_vas[kind] != NULL) { 1276 free_pages_exact(md->buffer_stack_vas[kind], 1277 md->buffer_stack_bytes[kind]); 1278 md->buffer_stack_vas[kind] = NULL; 1282 md->first_buffer_stack = -1; 1283 md->first_bucket = -1; 1301 struct mpipe_data *md = &mpipe_data[instance]; tile_net_init_mpipe() local 1309 rc = gxio_mpipe_init(&md->context, instance); tile_net_init_mpipe() 1322 rc = gxio_mpipe_alloc_notif_rings(&md->context, tile_net_init_mpipe() 1351 register_ptp_clock(dev, md); 1375 struct mpipe_data *md = &mpipe_data[instance]; tile_net_init_egress() local 1378 if (md->egress_for_echannel[echannel].equeue != NULL) tile_net_init_egress() 1417 rc = gxio_mpipe_alloc_edma_rings(&md->context, 1, 0, 0); tile_net_init_egress() 1427 rc = gxio_mpipe_equeue_init(equeue, &md->context, ering, echannel, tile_net_init_egress() 1448 md->egress_for_echannel[echannel].equeue = equeue; tile_net_init_egress() 1449 md->egress_for_echannel[echannel].headers = headers; tile_net_init_egress() 1470 struct mpipe_data *md = &mpipe_data[instance]; tile_net_link_open() local 1471 int rc = gxio_mpipe_link_open(link, &md->context, link_name, 0); tile_net_link_open() 1599 struct mpipe_data *md = &mpipe_data[instance]; tile_net_stop() local 1611 md->tile_net_devs_for_channel[priv->channel] = NULL; 1834 struct mpipe_data *md = &mpipe_data[instance]; tso_egress() local 1857 edesc_head.stack_idx = md->first_buffer_stack; tso_egress() 1858 edesc_body.stack_idx = md->first_buffer_stack; tso_egress() 1934 struct mpipe_data *md = &mpipe_data[instance]; tile_net_tx_tso() local 1935 struct tile_net_egress *egress = &md->egress_for_echannel[channel]; tile_net_tx_tso() 2002 struct mpipe_data *md = &mpipe_data[instance]; tile_net_tx() local 2004 &md->egress_for_echannel[priv->echannel]; tile_net_tx() 2024 edesc.stack_idx = md->first_buffer_stack; tile_net_tx() 2142 struct mpipe_data *md = &mpipe_data[instance]; tile_net_netpoll() local 2144 disable_percpu_irq(md->ingress_irq); tile_net_netpoll() 2146 enable_percpu_irq(md->ingress_irq, 0); tile_net_netpoll()
|
/linux-4.1.27/drivers/firmware/efi/ |
H A D | efi.c | 254 efi_memory_desc_t *md = p; efi_lookup_mapped_addr() local 255 u64 size = md->num_pages << EFI_PAGE_SHIFT; efi_lookup_mapped_addr() 256 u64 end = md->phys_addr + size; efi_lookup_mapped_addr() 257 if (!(md->attribute & EFI_MEMORY_RUNTIME) && efi_lookup_mapped_addr() 258 md->type != EFI_BOOT_SERVICES_CODE && efi_lookup_mapped_addr() 259 md->type != EFI_BOOT_SERVICES_DATA) efi_lookup_mapped_addr() 261 if (!md->virt_addr) efi_lookup_mapped_addr() 263 if (phys_addr >= md->phys_addr && phys_addr < end) { efi_lookup_mapped_addr() 264 phys_addr += md->virt_addr - md->phys_addr; efi_lookup_mapped_addr() 485 const efi_memory_desc_t *md) efi_md_typeattr_format() 492 if (md->type >= ARRAY_SIZE(memory_type_name)) efi_md_typeattr_format() 493 type_len = snprintf(pos, size, "[type=%u", md->type); efi_md_typeattr_format() 497 memory_type_name[md->type]); efi_md_typeattr_format() 504 attr = md->attribute; efi_md_typeattr_format() 484 efi_md_typeattr_format(char *buf, size_t size, const efi_memory_desc_t *md) efi_md_typeattr_format() argument
|
H A D | runtime-map.c | 22 efi_memory_desc_t md; member in struct:efi_runtime_map_entry 40 return snprintf(buf, PAGE_SIZE, "0x%x\n", entry->md.type); type_show() 43 #define EFI_RUNTIME_FIELD(var) entry->md.var 127 memcpy(&entry->md, efi_runtime_map + nr * efi_memdesc_size, add_sysfs_runtime_map_entry()
|
/linux-4.1.27/scripts/mod/ |
H A D | sumversion.c | 225 static inline void add_char(unsigned char c, struct md4_ctx *md) add_char() argument 227 md4_update(md, &c, 1); add_char() 231 struct md4_ctx *md) parse_string() 235 add_char(file[0], md); parse_string() 237 add_char(file[i], md); parse_string() 256 static int parse_file(const char *fname, struct md4_ctx *md) parse_file() argument 278 i += parse_string(file+i, len - i, md); parse_file() 288 add_char(file[i], md); parse_file() 305 static int parse_source_files(const char *objfile, struct md4_ctx *md) parse_source_files() argument 351 if (!parse_file(p, md)) { parse_source_files() 379 if (!parse_file(line, md)) { parse_source_files() 404 struct md4_ctx md; get_src_version() local 441 md4_init(&md); get_src_version() 446 !parse_source_files(fname, &md)) get_src_version() 450 md4_final_ascii(&md, sum, sumlen); get_src_version() 230 parse_string(const char *file, unsigned long len, struct md4_ctx *md) parse_string() argument
|
/linux-4.1.27/drivers/clk/qcom/ |
H A D | clk-rcg.c | 114 static u32 md_to_m(struct mn *mn, u32 md) md_to_m() argument 116 md >>= mn->m_val_shift; md_to_m() 117 md &= BIT(mn->width) - 1; md_to_m() 118 return md; md_to_m() 140 static u32 mn_to_md(struct mn *mn, u32 m, u32 n, u32 md) mn_to_md() argument 146 md &= ~mask; mn_to_md() 150 md |= m; mn_to_md() 151 md |= ~n & mask_w; mn_to_md() 154 return md; mn_to_md() 208 u32 ns, md, reg; configure_bank() local 241 ret = regmap_read(rcg->clkr.regmap, md_reg, &md); configure_bank() 244 md = mn_to_md(mn, f->m, f->n, md); configure_bank() 245 ret = regmap_write(rcg->clkr.regmap, md_reg, md); configure_bank() 302 u32 ns, md, reg; clk_dyn_rcg_set_parent() local 314 regmap_read(rcg->clkr.regmap, rcg->md_reg[bank], &md); clk_dyn_rcg_set_parent() 315 f.m = md_to_m(&rcg->mn[bank], md); clk_dyn_rcg_set_parent() 353 u32 pre_div, m = 0, n = 0, ns, md, mode = 0; clk_rcg_recalc_rate() local 360 regmap_read(rcg->clkr.regmap, rcg->md_reg, &md); clk_rcg_recalc_rate() 361 m = md_to_m(mn, md); clk_rcg_recalc_rate() 378 u32 m, n, pre_div, ns, md, mode, reg; clk_dyn_rcg_recalc_rate() local 392 regmap_read(rcg->clkr.regmap, rcg->md_reg[bank], &md); clk_dyn_rcg_recalc_rate() 393 m = md_to_m(mn, md); clk_dyn_rcg_recalc_rate() 489 u32 ns, md, ctl; __clk_rcg_set_rate() local 503 regmap_read(rcg->clkr.regmap, rcg->md_reg, &md); __clk_rcg_set_rate() 504 md = mn_to_md(mn, f->m, f->n, md); __clk_rcg_set_rate() 505 regmap_write(rcg->clkr.regmap, rcg->md_reg, md); __clk_rcg_set_rate()
|
/linux-4.1.27/arch/unicore32/mm/ |
H A D | mmu.c | 204 * page tables for the mapping specified by `md'. We 208 static void __init create_mapping(struct map_desc *md) create_mapping() argument 214 if (md->virtual != vectors_base() && md->virtual < TASK_SIZE) { create_mapping() 217 __pfn_to_phys((u64)md->pfn), md->virtual); create_mapping() 221 if ((md->type == MT_DEVICE || md->type == MT_ROM) && create_mapping() 222 md->virtual >= PAGE_OFFSET && md->virtual < VMALLOC_END) { create_mapping() 225 __pfn_to_phys((u64)md->pfn), md->virtual); create_mapping() 228 type = &mem_types[md->type]; create_mapping() 230 addr = md->virtual & PAGE_MASK; create_mapping() 231 phys = (unsigned long)__pfn_to_phys(md->pfn); create_mapping() 232 length = PAGE_ALIGN(md->length + (md->virtual & ~PAGE_MASK)); create_mapping() 237 __pfn_to_phys(md->pfn), addr); create_mapping()
|
/linux-4.1.27/drivers/mtd/nand/ |
H A D | nand_bbt.c | 386 * @md: descriptor for the bad block table mirror 392 struct nand_bbt_descr *td, struct nand_bbt_descr *md) read_abs_bbts() 406 if (md && (md->options & NAND_BBT_VERSION)) { read_abs_bbts() 407 scan_read(mtd, buf, (loff_t)md->pages[0] << this->page_shift, read_abs_bbts() 408 mtd->writesize, md); read_abs_bbts() 409 md->version[0] = buf[bbt_get_ver_offs(mtd, md)]; read_abs_bbts() 411 md->pages[0], md->version[0]); read_abs_bbts() 594 * @md: descriptor for the bad block table mirror 600 struct nand_bbt_descr *md) search_read_bbts() 606 if (md) search_read_bbts() 607 search_bbt(mtd, buf, md); search_read_bbts() 615 * @md: descriptor for the bad block table mirror 621 struct nand_bbt_descr *td, struct nand_bbt_descr *md, write_bbt() 692 if (!md || md->pages[chip] != page) write_bbt() 846 struct nand_bbt_descr *md = this->bbt_md; check_create() local 864 if (md) { check_create() 865 if (td->pages[i] == -1 && md->pages[i] == -1) { check_create() 869 rd = md; check_create() 871 } else if (md->pages[i] == -1) { check_create() 874 } else if (td->version[i] == md->version[i]) { check_create() 877 rd2 = md; check_create() 878 } else if (((int8_t)(td->version[i] - md->version[i])) > 0) { check_create() 882 rd = md; check_create() 904 if (md) check_create() 905 md->version[i] = 1; check_create() 936 if (md) { check_create() 937 td->version[i] = max(td->version[i], md->version[i]); check_create() 938 md->version[i] = td->version[i]; check_create() 943 res = write_bbt(mtd, buf, td, md, chipsel); check_create() 949 if ((writeops & 0x02) && md && (md->options & NAND_BBT_WRITE)) { check_create() 950 res = write_bbt(mtd, buf, md, td, chipsel); check_create() 1084 struct nand_bbt_descr *md = this->bbt_md; nand_scan_bbt() local 1108 verify_bbt_descr(mtd, md); nand_scan_bbt() 1122 read_abs_bbts(mtd, buf, td, md); nand_scan_bbt() 1125 search_read_bbts(mtd, buf, td, md); nand_scan_bbt() 1132 if (md) nand_scan_bbt() 1133 mark_bbt_region(mtd, md); nand_scan_bbt() 1153 struct nand_bbt_descr *md = this->bbt_md; nand_update_bbt() local 1175 if (md) nand_update_bbt() 1176 md->version[chip]++; nand_update_bbt() 1180 res = write_bbt(mtd, buf, td, md, chipsel); nand_update_bbt() 1185 if (md && (md->options & NAND_BBT_WRITE)) { nand_update_bbt() 1186 res = write_bbt(mtd, buf, md, td, chipsel); nand_update_bbt() 391 read_abs_bbts(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr *td, struct nand_bbt_descr *md) read_abs_bbts() argument 598 search_read_bbts(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr *td, struct nand_bbt_descr *md) search_read_bbts() argument 620 write_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr *td, struct nand_bbt_descr *md, int chipsel) write_bbt() argument
|
/linux-4.1.27/include/linux/ |
H A D | device-mapper.h | 371 int dm_create(int minor, struct mapped_device **md); 374 * Reference counting for md. 377 void dm_get(struct mapped_device *md); 378 int dm_hold(struct mapped_device *md); 379 void dm_put(struct mapped_device *md); 384 void dm_set_mdptr(struct mapped_device *md, void *ptr); 385 void *dm_get_mdptr(struct mapped_device *md); 390 int dm_suspend(struct mapped_device *md, unsigned suspend_flags); 391 int dm_resume(struct mapped_device *md); 396 uint32_t dm_get_event_nr(struct mapped_device *md); 397 int dm_wait_event(struct mapped_device *md, int event_nr); 398 uint32_t dm_next_uevent_seq(struct mapped_device *md); 399 void dm_uevent_add(struct mapped_device *md, struct list_head *elist); 404 const char *dm_device_name(struct mapped_device *md); 405 int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid); 406 struct gendisk *dm_disk(struct mapped_device *md); 412 struct queue_limits *dm_get_queue_limits(struct mapped_device *md); 417 int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo); 418 int dm_set_geometry(struct mapped_device *md, struct hd_geometry *geo); 428 unsigned num_targets, struct mapped_device *md); 454 struct dm_table *dm_get_live_table(struct mapped_device *md, int *srcu_idx); 455 void dm_put_live_table(struct mapped_device *md, int srcu_idx); 456 void dm_sync_table(struct mapped_device *md); 480 struct dm_table *dm_swap_table(struct mapped_device *md,
|
H A D | efi.h | 896 #define for_each_efi_memory_desc(m, md) \ 897 for ((md) = (m)->map; \ 898 (md) <= (efi_memory_desc_t *)((m)->map_end - (m)->desc_size); \ 899 (md) = (void *)(md) + (m)->desc_size) 906 const efi_memory_desc_t *md);
|
H A D | backing-dev.h | 67 congested_fn *congested_fn; /* Function pointer if device is md/dm */
|
H A D | blkdev.h | 1094 struct list_head cb_list; /* md requires an unplug callback */ blk_post_runtime_resume()
|
/linux-4.1.27/drivers/media/pci/cx23885/ |
H A D | cx23885-av.h | 6 * Copyright (C) 2010 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx23885-video.h | 4 * Copyright (C) 2010 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx23888-ir.h | 6 * Copyright (C) 2009 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx23885-input.h | 6 * Copyright (C) 2009 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx23885-ioctl.h | 6 * Copyright (c) 2009 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx23885-ir.h | 6 * Copyright (C) 2009 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx23885-av.c | 6 * Copyright (C) 2010 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx23885-ioctl.c | 6 * Copyright (c) 2009 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx23885-ir.c | 6 * Copyright (C) 2009 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx23885-input.c | 8 * Copyright (C) 2009 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx23888-ir.c | 6 * Copyright (C) 2009 Andy Walls <awalls@md.metrocast.net>
|
/linux-4.1.27/drivers/clk/shmobile/ |
H A D | clk-r8a7779.c | 55 #define CPG_CLK_CONFIG_INDEX(md) (((md) & (BIT(2)|BIT(1))) >> 1) 83 #define CPG_PLLA_MULT_INDEX(md) (((md) & (BIT(12)|BIT(11))) >> 11)
|
H A D | clk-rcar-gen2.c | 267 #define CPG_PLL_CONFIG_INDEX(md) ((((md) & BIT(14)) >> 12) | \ 268 (((md) & BIT(13)) >> 12) | \ 269 (((md) & BIT(19)) >> 19))
|
/linux-4.1.27/fs/proc/ |
H A D | task_mmu.c | 1359 struct numa_maps md; member in struct:numa_maps_private 1362 static void gather_stats(struct page *page, struct numa_maps *md, int pte_dirty, gather_stats() argument 1367 md->pages += nr_pages; gather_stats() 1369 md->dirty += nr_pages; gather_stats() 1372 md->swapcache += nr_pages; gather_stats() 1375 md->active += nr_pages; gather_stats() 1378 md->writeback += nr_pages; gather_stats() 1381 md->anon += nr_pages; gather_stats() 1383 if (count > md->mapcount_max) gather_stats() 1384 md->mapcount_max = count; gather_stats() 1386 md->node[page_to_nid(page)] += nr_pages; gather_stats() 1415 struct numa_maps *md = walk->private; gather_pte_stats() local 1427 gather_stats(page, md, pte_dirty(huge_pte), gather_pte_stats() 1440 gather_stats(page, md, pte_dirty(*pte), 1); gather_pte_stats() 1450 struct numa_maps *md; gather_hugetlb_stats() local 1460 md = walk->private; gather_hugetlb_stats() 1461 gather_stats(page, md, pte_dirty(*pte), 1); gather_hugetlb_stats() 1481 struct numa_maps *md = &numa_priv->md; show_numa_map() local 1487 .private = md, show_numa_map() 1498 memset(md, 0, sizeof(*md)); show_numa_map() 1536 if (!md->pages) show_numa_map() 1539 if (md->anon) show_numa_map() 1540 seq_printf(m, " anon=%lu", md->anon); show_numa_map() 1542 if (md->dirty) show_numa_map() 1543 seq_printf(m, " dirty=%lu", md->dirty); show_numa_map() 1545 if (md->pages != md->anon && md->pages != md->dirty) show_numa_map() 1546 seq_printf(m, " mapped=%lu", md->pages); show_numa_map() 1548 if (md->mapcount_max > 1) show_numa_map() 1549 seq_printf(m, " mapmax=%lu", md->mapcount_max); show_numa_map() 1551 if (md->swapcache) show_numa_map() 1552 seq_printf(m, " swapcache=%lu", md->swapcache); show_numa_map() 1554 if (md->active < md->pages && !is_vm_hugetlb_page(vma)) show_numa_map() 1555 seq_printf(m, " active=%lu", md->active); show_numa_map() 1557 if (md->writeback) show_numa_map() 1558 seq_printf(m, " writeback=%lu", md->writeback); show_numa_map() 1561 if (md->node[nid]) show_numa_map() 1562 seq_printf(m, " N%d=%lu", nid, md->node[nid]); show_numa_map()
|
/linux-4.1.27/net/openvswitch/ |
H A D | vport-vxlan.c | 65 struct vxlan_metadata *md) vxlan_rcv() 72 .gbp = md->gbp, vxlan_rcv() 79 if (vxlan_port->exts & VXLAN_F_GBP && md->gbp) vxlan_rcv() 84 key = cpu_to_be64(ntohl(md->vni) >> 8); vxlan_rcv() 228 struct vxlan_metadata md = {0}; vxlan_tnl_send() local 254 md.vni = htonl(be64_to_cpu(tun_key->tun_id) << 8); vxlan_tnl_send() 255 md.gbp = vxlan_ext_gbp(skb); vxlan_tnl_send() 262 &md, false, vxflags); vxlan_tnl_send() 64 vxlan_rcv(struct vxlan_sock *vs, struct sk_buff *skb, struct vxlan_metadata *md) vxlan_rcv() argument
|
/linux-4.1.27/arch/arm/mm/ |
H A D | mmu.c | 779 static void __init create_36bit_mapping(struct map_desc *md, create_36bit_mapping() argument 786 addr = md->virtual; create_36bit_mapping() 787 phys = __pfn_to_phys(md->pfn); create_36bit_mapping() 788 length = PAGE_ALIGN(md->length); create_36bit_mapping() 792 (long long)__pfn_to_phys((u64)md->pfn), addr); create_36bit_mapping() 804 (long long)__pfn_to_phys((u64)md->pfn), addr); create_36bit_mapping() 808 if ((addr | length | __pfn_to_phys(md->pfn)) & ~SUPERSECTION_MASK) { create_36bit_mapping() 810 (long long)__pfn_to_phys((u64)md->pfn), addr); create_36bit_mapping() 818 phys |= (((md->pfn >> (32 - PAGE_SHIFT)) & 0xF) << 20); create_36bit_mapping() 839 * page tables for the mapping specified by `md'. We 844 static void __init create_mapping(struct map_desc *md) create_mapping() argument 851 if (md->virtual != vectors_base() && md->virtual < TASK_SIZE) { create_mapping() 853 (long long)__pfn_to_phys((u64)md->pfn), md->virtual); create_mapping() 857 if ((md->type == MT_DEVICE || md->type == MT_ROM) && create_mapping() 858 md->virtual >= PAGE_OFFSET && create_mapping() 859 (md->virtual < VMALLOC_START || md->virtual >= VMALLOC_END)) { create_mapping() 861 (long long)__pfn_to_phys((u64)md->pfn), md->virtual); create_mapping() 864 type = &mem_types[md->type]; create_mapping() 870 if (md->pfn >= 0x100000) { create_mapping() 871 create_36bit_mapping(md, type); create_mapping() 876 addr = md->virtual & PAGE_MASK; create_mapping() 877 phys = __pfn_to_phys(md->pfn); create_mapping() 878 length = PAGE_ALIGN(md->length + (md->virtual & ~PAGE_MASK)); create_mapping() 882 (long long)__pfn_to_phys(md->pfn), addr); create_mapping() 903 struct map_desc *md; iotable_init() local 912 for (md = io_desc; nr; md++, nr--) { iotable_init() 913 create_mapping(md); iotable_init() 916 vm->addr = (void *)(md->virtual & PAGE_MASK); iotable_init() 917 vm->size = PAGE_ALIGN(md->length + (md->virtual & ~PAGE_MASK)); iotable_init() 918 vm->phys_addr = __pfn_to_phys(md->pfn); iotable_init() 920 vm->flags |= VM_ARM_MTYPE(md->type); iotable_init()
|
/linux-4.1.27/drivers/media/platform/s3c-camif/ |
H A D | camif-core.c | 310 struct media_device *md = &camif->media_dev; camif_media_dev_register() local 315 memset(md, 0, sizeof(*md)); camif_media_dev_register() 316 snprintf(md->model, sizeof(md->model), "SAMSUNG S3C%s CAMIF", camif_media_dev_register() 318 strlcpy(md->bus_info, "platform", sizeof(md->bus_info)); camif_media_dev_register() 319 md->hw_revision = ip_rev; camif_media_dev_register() 320 md->driver_version = KERNEL_VERSION(1, 0, 0); camif_media_dev_register() 322 md->dev = camif->dev; camif_media_dev_register() 325 v4l2_dev->mdev = md; camif_media_dev_register() 331 ret = media_device_register(md); camif_media_dev_register()
|
/linux-4.1.27/drivers/staging/lustre/lustre/mdc/ |
H A D | mdc_request.c | 467 static int mdc_unpack_acl(struct ptlrpc_request *req, struct lustre_md *md) mdc_unpack_acl() argument 470 struct mdt_body *body = md->body; mdc_unpack_acl() 500 md->posix_acl = acl; mdc_unpack_acl() 504 #define mdc_unpack_acl(req, md) 0 509 struct lustre_md *md) mdc_get_lustre_md() 514 LASSERT(md); mdc_get_lustre_md() 515 memset(md, 0, sizeof(*md)); mdc_get_lustre_md() 517 md->body = req_capsule_server_get(pill, &RMF_MDT_BODY); mdc_get_lustre_md() 518 LASSERT(md->body != NULL); mdc_get_lustre_md() 520 if (md->body->valid & OBD_MD_FLEASIZE) { mdc_get_lustre_md() 524 if (!S_ISREG(md->body->mode)) { mdc_get_lustre_md() 531 if (md->body->eadatasize == 0) { mdc_get_lustre_md() 537 lmmsize = md->body->eadatasize; mdc_get_lustre_md() 544 rc = obd_unpackmd(dt_exp, &md->lsm, lmm, lmmsize); mdc_get_lustre_md() 548 if (rc < sizeof(*md->lsm)) { mdc_get_lustre_md() 550 "lsm size too small: rc < sizeof (*md->lsm) (%d < %d)\n", mdc_get_lustre_md() 551 rc, (int)sizeof(*md->lsm)); mdc_get_lustre_md() 556 } else if (md->body->valid & OBD_MD_FLDIREA) { mdc_get_lustre_md() 560 if (!S_ISDIR(md->body->mode)) { mdc_get_lustre_md() 567 if (md->body->eadatasize == 0) { mdc_get_lustre_md() 572 if (md->body->valid & OBD_MD_MEA) { mdc_get_lustre_md() 573 lmvsize = md->body->eadatasize; mdc_get_lustre_md() 581 rc = obd_unpackmd(md_exp, (void *)&md->mea, lmv, mdc_get_lustre_md() 586 if (rc < sizeof(*md->mea)) { mdc_get_lustre_md() 588 "size too small: rc < sizeof(*md->mea) (%d < %d)\n", mdc_get_lustre_md() 589 rc, (int)sizeof(*md->mea)); mdc_get_lustre_md() 597 if (md->body->valid & OBD_MD_FLRMTPERM) { mdc_get_lustre_md() 600 md->remote_perm = req_capsule_server_swab_get(pill, &RMF_ACL, mdc_get_lustre_md() 602 if (!md->remote_perm) { mdc_get_lustre_md() 606 } else if (md->body->valid & OBD_MD_FLACL) { mdc_get_lustre_md() 611 if (md->body->aclsize) { mdc_get_lustre_md() 612 rc = mdc_unpack_acl(req, md); mdc_get_lustre_md() 617 md->posix_acl = NULL; mdc_get_lustre_md() 621 if (md->body->valid & OBD_MD_FLMDSCAPA) { mdc_get_lustre_md() 627 md->mds_capa = oc; mdc_get_lustre_md() 630 if (md->body->valid & OBD_MD_FLOSSCAPA) { mdc_get_lustre_md() 636 md->oss_capa = oc; mdc_get_lustre_md() 641 if (md->oss_capa) { mdc_get_lustre_md() 642 capa_put(md->oss_capa); mdc_get_lustre_md() 643 md->oss_capa = NULL; mdc_get_lustre_md() 645 if (md->mds_capa) { mdc_get_lustre_md() 646 capa_put(md->mds_capa); mdc_get_lustre_md() 647 md->mds_capa = NULL; mdc_get_lustre_md() 650 posix_acl_release(md->posix_acl); mdc_get_lustre_md() 652 if (md->lsm) mdc_get_lustre_md() 653 obd_free_memmd(dt_exp, &md->lsm); mdc_get_lustre_md() 658 int mdc_free_lustre_md(struct obd_export *exp, struct lustre_md *md) mdc_free_lustre_md() argument 507 mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req, struct obd_export *dt_exp, struct obd_export *md_exp, struct lustre_md *md) mdc_get_lustre_md() argument
|
H A D | mdc_internal.h | 119 struct lustre_md *md); 121 int mdc_free_lustre_md(struct obd_export *exp, struct lustre_md *md);
|
/linux-4.1.27/drivers/s390/char/ |
H A D | tape_3590.c | 993 sense->fmt.f70.md); tape_3590_print_mim_msg_f0() 1004 "procedure %i", sense->fmt.f70.md); tape_3590_print_mim_msg_f0() 1047 "interface 0x%02x", sense->fmt.f71.md[0]); tape_3590_print_io_sim_msg_f1() 1051 "0x%02x", sense->fmt.f71.md[0]); tape_3590_print_io_sim_msg_f1() 1055 "0x%02x", sense->fmt.f71.md[0]); tape_3590_print_io_sim_msg_f1() 1059 sense->fmt.f71.md[0]); tape_3590_print_io_sim_msg_f1() 1063 "0x%02x", sense->fmt.f71.md[0]); tape_3590_print_io_sim_msg_f1() 1081 "0x%x on CU", sense->fmt.f71.md[1]); tape_3590_print_io_sim_msg_f1() 1084 "nodes (0x%x-0x%x) on CU", sense->fmt.f71.md[1], tape_3590_print_io_sim_msg_f1() 1085 sense->fmt.f71.md[2]); tape_3590_print_io_sim_msg_f1() 1091 sense->fmt.f71.md[1]); tape_3590_print_io_sim_msg_f1() 1095 sense->fmt.f71.md[1], sense->fmt.f71.md[2]); tape_3590_print_io_sim_msg_f1() 1100 " path 0x%x on CU", sense->fmt.f71.md[1]); tape_3590_print_io_sim_msg_f1() 1104 sense->fmt.f71.md[1], sense->fmt.f71.md[2]); tape_3590_print_io_sim_msg_f1() 1110 sense->fmt.f71.md[1]); tape_3590_print_io_sim_msg_f1() 1114 sense->fmt.f71.md[1], sense->fmt.f71.md[2]); tape_3590_print_io_sim_msg_f1() 1158 "interface 0x%02x", sense->fmt.f71.md[0]); tape_3590_print_dev_sim_msg_f2() 1162 sense->fmt.f71.md[0]); tape_3590_print_dev_sim_msg_f2() 1166 " 0x%02x", sense->fmt.f71.md[0]); tape_3590_print_dev_sim_msg_f2() 1191 sense->fmt.f71.md[1]); tape_3590_print_dev_sim_msg_f2() 1195 sense->fmt.f71.md[1], sense->fmt.f71.md[2]); tape_3590_print_dev_sim_msg_f2() 1200 "interface 0x%x on DV", sense->fmt.f71.md[1]); tape_3590_print_dev_sim_msg_f2() 1204 sense->fmt.f71.md[1], sense->fmt.f71.md[2]); tape_3590_print_dev_sim_msg_f2() 1209 " 0x%x on DV", sense->fmt.f71.md[1]); tape_3590_print_dev_sim_msg_f2() 1213 sense->fmt.f71.md[1], sense->fmt.f71.md[2]); tape_3590_print_dev_sim_msg_f2() 1222 sense->fmt.f71.md[1]); tape_3590_print_dev_sim_msg_f2() 1226 sense->fmt.f71.md[1], sense->fmt.f71.md[2]); tape_3590_print_dev_sim_msg_f2()
|
H A D | tape_3590.h | 96 unsigned int md:8; member in struct:tape_3590_sense::__anon8425::__anon8426 109 unsigned char md[3]; member in struct:tape_3590_sense::__anon8425::__anon8427
|
/linux-4.1.27/arch/sparc/mm/ |
H A D | init_64.c | 929 static int scan_pio_for_cfg_handle(struct mdesc_handle *md, u64 pio, scan_pio_for_cfg_handle() argument 934 mdesc_for_each_arc(arc, md, pio, MDESC_ARC_TYPE_FWD) { mdesc_for_each_arc() 935 u64 target = mdesc_arc_target(md, arc); mdesc_for_each_arc() 938 val = mdesc_get_property(md, target, mdesc_for_each_arc() 946 static int scan_arcs_for_cfg_handle(struct mdesc_handle *md, u64 grp, scan_arcs_for_cfg_handle() argument 952 mdesc_for_each_arc(arc, md, grp, MDESC_ARC_TYPE_FWD) { mdesc_for_each_arc() 953 u64 target = mdesc_arc_target(md, arc); mdesc_for_each_arc() 954 const char *name = mdesc_node_name(md, target); mdesc_for_each_arc() 960 val = mdesc_get_property(md, target, "latency", NULL); mdesc_for_each_arc() 973 return scan_pio_for_cfg_handle(md, candidate, cfg_handle); 979 struct mdesc_handle *md; of_node_to_nid() local 997 md = mdesc_grab(); of_node_to_nid() 1001 mdesc_for_each_node_by_name(md, grp, "group") { of_node_to_nid() 1002 if (!scan_arcs_for_cfg_handle(md, grp, cfg_handle)) { of_node_to_nid() 1009 mdesc_release(md); of_node_to_nid() 1041 static int __init grab_mlgroups(struct mdesc_handle *md) grab_mlgroups() argument 1047 mdesc_for_each_node_by_name(md, node, "memory-latency-group") grab_mlgroups() 1061 mdesc_for_each_node_by_name(md, node, "memory-latency-group") { grab_mlgroups() 1067 val = mdesc_get_property(md, node, "latency", NULL); grab_mlgroups() 1069 val = mdesc_get_property(md, node, "address-match", NULL); grab_mlgroups() 1071 val = mdesc_get_property(md, node, "address-mask", NULL); grab_mlgroups() 1082 static int __init grab_mblocks(struct mdesc_handle *md) grab_mblocks() argument 1088 mdesc_for_each_node_by_name(md, node, "mblock") grab_mblocks() 1102 mdesc_for_each_node_by_name(md, node, "mblock") { grab_mblocks() 1106 val = mdesc_get_property(md, node, "base", NULL); grab_mblocks() 1108 val = mdesc_get_property(md, node, "size", NULL); grab_mblocks() 1110 val = mdesc_get_property(md, node, grab_mblocks() 1128 static void __init numa_parse_mdesc_group_cpus(struct mdesc_handle *md, numa_parse_mdesc_group_cpus() argument 1135 mdesc_for_each_arc(arc, md, grp, MDESC_ARC_TYPE_BACK) { mdesc_for_each_arc() 1136 u64 target = mdesc_arc_target(md, arc); mdesc_for_each_arc() 1137 const char *name = mdesc_node_name(md, target); mdesc_for_each_arc() 1142 id = mdesc_get_property(md, target, "id", NULL); mdesc_for_each_arc() 1160 static int __init numa_attach_mlgroup(struct mdesc_handle *md, u64 grp, numa_attach_mlgroup() argument 1167 mdesc_for_each_arc(arc, md, grp, MDESC_ARC_TYPE_FWD) { mdesc_for_each_arc() 1168 u64 target = mdesc_arc_target(md, arc); mdesc_for_each_arc() 1198 static int __init numa_parse_mdesc_group(struct mdesc_handle *md, u64 grp, numa_parse_mdesc_group() argument 1204 numa_parse_mdesc_group_cpus(md, grp, &mask); numa_parse_mdesc_group() 1217 return numa_attach_mlgroup(md, grp, index); numa_parse_mdesc_group() 1222 struct mdesc_handle *md = mdesc_grab(); numa_parse_mdesc() local 1226 node = mdesc_node_by_name(md, MDESC_NODE_NULL, "latency-groups"); numa_parse_mdesc() 1228 mdesc_release(md); numa_parse_mdesc() 1232 err = grab_mblocks(md); numa_parse_mdesc() 1236 err = grab_mlgroups(md); numa_parse_mdesc() 1241 mdesc_for_each_node_by_name(md, node, "group") { numa_parse_mdesc() 1242 err = numa_parse_mdesc_group(md, node, count); numa_parse_mdesc() 1257 mdesc_release(md); numa_parse_mdesc()
|
/linux-4.1.27/drivers/media/pci/cx18/ |
H A D | cx18-gpio.h | 7 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-irq.h | 5 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-streams.h | 7 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-io.h | 5 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net> 31 * The implmentation is the fault of Andy Walls <awalls@md.metrocast.net>.
|
H A D | cx18-alsa.h | 4 * Copyright (C) 2009 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-irq.c | 5 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-queue.h | 7 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-io.c | 5 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-alsa-mixer.c | 5 * Copyright (C) 2009 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-cards.h | 7 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-mailbox.h | 5 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-scb.c | 5 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-alsa-main.c | 4 * Copyright (C) 2009 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-alsa-pcm.c | 5 * Copyright (C) 2009 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-av-firmware.c | 5 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-gpio.c | 7 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-i2c.c | 7 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-scb.h | 5 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-av-core.h | 7 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-av-audio.c | 7 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-cards.c | 7 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-dvb.c | 5 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-firmware.c | 5 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-queue.c | 7 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-mailbox.c | 5 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-driver.c | 7 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-driver.h | 7 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-fileops.c | 7 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-ioctl.c | 7 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-streams.c | 7 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
H A D | cx18-av-core.c | 7 * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net>
|
/linux-4.1.27/arch/x86/include/asm/ |
H A D | efi.h | 92 extern void __init efi_set_executable(efi_memory_desc_t *md, bool executable); 98 extern void __init efi_map_region(efi_memory_desc_t *md); 99 extern void __init efi_map_region_fixed(efi_memory_desc_t *md); 103 extern void __init old_map_region(efi_memory_desc_t *md);
|
/linux-4.1.27/drivers/staging/lustre/lustre/llite/ |
H A D | llite_lib.c | 152 static int client_common_fill_super(struct super_block *sb, char *md, char *dt, client_common_fill_super() argument 168 obd = class_name2obd(md); client_common_fill_super() 170 CERROR("MD %s: not setup or attached\n", md); client_common_fill_super() 186 dt, md); client_common_fill_super() 255 LCONSOLE_ERROR_MSG(0x14f, "An MDT (md %s) is performing recovery, of which this client is not a part. Please wait for recovery to complete, abort, or time out.\n", client_common_fill_super() 256 md); client_common_fill_super() 259 CERROR("cannot connect to %s: rc = %d\n", md, err); client_common_fill_super() 514 CERROR("failed to understand root inode md: rc = %d\n", err); client_common_fill_super() 916 char *dt = NULL, *md = NULL; ll_fill_super() local 986 md = kasprintf(GFP_NOFS, "%s-%p", lprof->lp_md, cfg->cfg_instance); ll_fill_super() 987 if (!md) { ll_fill_super() 993 err = client_common_fill_super(sb, md, dt, mnt); ll_fill_super() 996 if (md) ll_fill_super() 997 OBD_FREE(md, strlen(lprof->lp_md) + instlen + 2); ll_fill_super() 1168 struct lustre_md md; ll_md_setattr() local 1201 sbi->ll_md_exp, &md); ll_md_setattr() 1215 op_data->op_handle = md.body->handle; ll_md_setattr() 1216 op_data->op_ioepoch = md.body->ioepoch; ll_md_setattr() 1218 ll_update_inode(inode, &md); ll_md_setattr() 1602 void ll_update_inode(struct inode *inode, struct lustre_md *md) ll_update_inode() argument 1605 struct mdt_body *body = md->body; ll_update_inode() 1606 struct lov_stripe_md *lsm = md->lsm; ll_update_inode() 1613 cl_file_inode_init(inode, md); ll_update_inode() 1622 ll_update_remote_perm(inode, md->remote_perm); ll_update_inode() 1629 lli->lli_posix_acl = md->posix_acl; ll_update_inode() 1735 LASSERT(md->mds_capa); ll_update_inode() 1736 ll_add_capa(inode, md->mds_capa); ll_update_inode() 1739 LASSERT(md->oss_capa); ll_update_inode() 1740 ll_add_capa(inode, md->oss_capa); ll_update_inode() 1751 struct lustre_md *md = opaque; ll_read_inode2() local 1767 ll_update_inode(inode, md); ll_read_inode2() 2006 struct lustre_md md; ll_prep_inode() local 2012 sbi->ll_md_exp, &md); ll_prep_inode() 2017 ll_update_inode(*inode, &md); ll_prep_inode() 2025 LASSERT(fid_is_sane(&md.body->fid1)); ll_prep_inode() 2027 *inode = ll_iget(sb, cl_fid_build_ino(&md.body->fid1, ll_prep_inode() 2029 &md); ll_prep_inode() 2032 if (md.posix_acl) { ll_prep_inode() 2033 posix_acl_release(md.posix_acl); ll_prep_inode() 2034 md.posix_acl = NULL; ll_prep_inode() 2066 conf.u.coc_md = &md; ll_prep_inode() 2073 if (md.lsm != NULL) ll_prep_inode() 2074 obd_free_memmd(sbi->ll_dt_exp, &md.lsm); ll_prep_inode() 2075 md_free_lustre_md(sbi->ll_md_exp, &md); ll_prep_inode()
|
H A D | namei.c | 61 struct lustre_md *md = opaque; ll_test_inode() local 63 if (unlikely(!(md->body->valid & OBD_MD_FLID))) { ll_test_inode() 68 if (!lu_fid_eq(&lli->lli_fid, &md->body->fid1)) ll_test_inode() 109 struct lustre_md *md) ll_iget() 114 inode = iget5_locked(sb, hash, ll_test_inode, ll_set_inode, md); ll_iget() 120 ll_read_inode2(inode, md); ll_iget() 125 ll_get_fsname(sb, NULL, 0), md->lsm, ll_iget() 127 rc = cl_file_inode_init(inode, md); ll_iget() 137 ll_update_inode(inode, md); ll_iget() 139 inode, PFID(&md->body->fid1)); ll_iget() 108 ll_iget(struct super_block *sb, ino_t hash, struct lustre_md *md) ll_iget() argument
|
H A D | file.c | 3408 struct lustre_md md = { NULL }; ll_layout_lock_set() local 3451 rc = obd_unpackmd(sbi->ll_dt_exp, &md.lsm, ll_layout_lock_set() 3455 if (md.lsm != NULL) ll_layout_lock_set() 3456 *gen = md.lsm->lsm_layout_gen; ll_layout_lock_set() 3473 conf.u.coc_md = &md; ll_layout_lock_set() 3476 if (md.lsm != NULL) ll_layout_lock_set() 3477 obd_free_memmd(sbi->ll_dt_exp, &md.lsm); ll_layout_lock_set()
|
/linux-4.1.27/arch/cris/include/arch-v32/arch/hwregs/ |
H A D | dma.h | 27 unsigned md : 16; member in struct:dma_descr_group 68 unsigned md : 16; member in struct:dma_descr_data
|
H A D | sser_defs.h | 182 unsigned int md : 1; member in struct:__anon860 191 unsigned int md : 1; member in struct:__anon861
|
H A D | dma_defs.h | 125 unsigned int md : 16; member in struct:__anon423 277 unsigned int md : 16; member in struct:__anon431
|
/linux-4.1.27/arch/ia64/hp/sim/boot/ |
H A D | fw-emu.c | 238 efi_memory_desc_t *efi_memmap, *md; sys_fw_init() local 247 md = efi_memmap + i++; \ sys_fw_init() 248 md->type = typ; \ sys_fw_init() 249 md->pad = 0; \ sys_fw_init() 250 md->phys_addr = start; \ sys_fw_init() 251 md->virt_addr = 0; \ sys_fw_init() 252 md->num_pages = (end - start) >> 12; \ sys_fw_init() 253 md->attribute = attr; \ sys_fw_init()
|
/linux-4.1.27/net/ipv4/ |
H A D | tcp_highspeed.c | 17 unsigned int md; member in struct:hstcp_aimd_val 156 return max(tp->snd_cwnd - ((tp->snd_cwnd * hstcp_aimd_vals[ca->ai].md) >> 8), 2U); hstcp_ssthresh()
|
/linux-4.1.27/fs/ncpfs/ |
H A D | inode.c | 493 struct ncp_mount_data* md = (struct ncp_mount_data*)raw_data; ncp_fill_super() local 495 data.flags = md->flags; ncp_fill_super() 497 data.mounted_uid = make_kuid(current_user_ns(), md->mounted_uid); ncp_fill_super() 498 data.wdog_pid = find_get_pid(md->wdog_pid); ncp_fill_super() 499 data.ncp_fd = md->ncp_fd; ncp_fill_super() 500 data.time_out = md->time_out; ncp_fill_super() 501 data.retry_count = md->retry_count; ncp_fill_super() 502 data.uid = make_kuid(current_user_ns(), md->uid); ncp_fill_super() 503 data.gid = make_kgid(current_user_ns(), md->gid); ncp_fill_super() 504 data.file_mode = md->file_mode; ncp_fill_super() 505 data.dir_mode = md->dir_mode; ncp_fill_super() 507 memcpy(data.mounted_vol, md->mounted_vol, ncp_fill_super() 513 struct ncp_mount_data_v4* md = (struct ncp_mount_data_v4*)raw_data; ncp_fill_super() local 515 data.flags = md->flags; ncp_fill_super() 516 data.mounted_uid = make_kuid(current_user_ns(), md->mounted_uid); ncp_fill_super() 517 data.wdog_pid = find_get_pid(md->wdog_pid); ncp_fill_super() 518 data.ncp_fd = md->ncp_fd; ncp_fill_super() 519 data.time_out = md->time_out; ncp_fill_super() 520 data.retry_count = md->retry_count; ncp_fill_super() 521 data.uid = make_kuid(current_user_ns(), md->uid); ncp_fill_super() 522 data.gid = make_kgid(current_user_ns(), md->gid); ncp_fill_super() 523 data.file_mode = md->file_mode; ncp_fill_super() 524 data.dir_mode = md->dir_mode; ncp_fill_super()
|
/linux-4.1.27/tools/perf/util/ |
H A D | evlist.c | 636 struct perf_mmap *md = &evlist->mmap[idx]; perf_evlist__mmap_read() local 637 u64 head = perf_mmap__read_head(md); perf_evlist__mmap_read() 638 u64 old = md->prev; perf_evlist__mmap_read() 639 unsigned char *data = md->base + page_size; perf_evlist__mmap_read() 652 if (diff > md->mask / 2 || diff < 0) { perf_evlist__mmap_read() 665 event = (union perf_event *)&data[old & md->mask]; perf_evlist__mmap_read() 672 if ((old & md->mask) + size != ((old + size) & md->mask)) { perf_evlist__mmap_read() 675 void *dst = md->event_copy; perf_evlist__mmap_read() 678 cpy = min(md->mask + 1 - (offset & md->mask), len); perf_evlist__mmap_read() 679 memcpy(dst, &data[offset & md->mask], cpy); perf_evlist__mmap_read() 685 event = (union perf_event *) md->event_copy; perf_evlist__mmap_read() 691 md->prev = old; perf_evlist__mmap_read() 696 static bool perf_mmap__empty(struct perf_mmap *md) perf_mmap__empty() argument 698 return perf_mmap__read_head(md) == md->prev; perf_mmap__empty() 716 struct perf_mmap *md = &evlist->mmap[idx]; perf_evlist__mmap_consume() local 719 u64 old = md->prev; perf_evlist__mmap_consume() 721 perf_mmap__write_tail(md, old); perf_evlist__mmap_consume() 724 if (md->refcnt == 1 && perf_mmap__empty(md)) perf_evlist__mmap_consume()
|
H A D | symbol.c | 1080 struct kcore_mapfn_data *md = data; kcore_mapfn() local 1083 map = map__new2(start, md->dso, md->type); kcore_mapfn() 1090 list_add(&map->node, &md->maps); kcore_mapfn() 1100 struct kcore_mapfn_data md; dso__load_kcore() local 1124 md.dso = dso; dso__load_kcore() 1125 md.type = map->type; dso__load_kcore() 1126 INIT_LIST_HEAD(&md.maps); dso__load_kcore() 1133 err = file__read_maps(fd, md.type == MAP__FUNCTION, kcore_mapfn, &md, dso__load_kcore() 1139 if (list_empty(&md.maps)) { dso__load_kcore() 1156 list_for_each_entry(new_map, &md.maps, node) { dso__load_kcore() 1165 replacement_map = list_entry(md.maps.next, struct map, node); dso__load_kcore() 1168 while (!list_empty(&md.maps)) { dso__load_kcore() 1169 new_map = list_entry(md.maps.next, struct map, node); dso__load_kcore() 1206 while (!list_empty(&md.maps)) { dso__load_kcore() 1207 map = list_entry(md.maps.next, struct map, node); dso__load_kcore()
|
H A D | evlist.h | 200 static inline void perf_mmap__write_tail(struct perf_mmap *md, u64 tail) perf_mmap__write_tail() argument 202 struct perf_event_mmap_page *pc = md->base; perf_mmap__write_tail()
|
/linux-4.1.27/arch/cris/include/arch-v32/arch/hwregs/iop/ |
H A D | iop_dmc_in_defs.h | 163 unsigned int md : 16; member in struct:__anon502 187 unsigned int md : 16; member in struct:__anon504 194 unsigned int md : 16; member in struct:__anon505 220 unsigned int md : 16; member in struct:__anon507
|
H A D | iop_dmc_out_defs.h | 153 unsigned int md : 16; member in struct:__anon518 177 unsigned int md : 16; member in struct:__anon520 184 unsigned int md : 16; member in struct:__anon521 210 unsigned int md : 16; member in struct:__anon523
|
/linux-4.1.27/drivers/block/drbd/ |
H A D | drbd_main.c | 850 spin_lock_irq(&device->ldev->md.uuid_lock); _drbd_send_uuids() 852 p->uuid[i] = cpu_to_be64(device->ldev->md.uuid[i]); _drbd_send_uuids() 853 spin_unlock_irq(&device->ldev->md.uuid_lock); _drbd_send_uuids() 881 u64 *uuid = device->ldev->md.uuid; drbd_print_uuids() 905 uuid = device->ldev->md.uuid[UI_BITMAP]; drbd_gen_and_send_sync_uuid() 3065 buffer->uuid[i] = cpu_to_be64(device->ldev->md.uuid[i]); drbd_md_write() 3066 buffer->flags = cpu_to_be32(device->ldev->md.flags); drbd_md_write() 3069 buffer->md_size_sect = cpu_to_be32(device->ldev->md.md_size_sect); drbd_md_write() 3070 buffer->al_offset = cpu_to_be32(device->ldev->md.al_offset); drbd_md_write() 3073 buffer->device_uuid = cpu_to_be64(device->ldev->md.device_uuid); drbd_md_write() 3075 buffer->bm_offset = cpu_to_be32(device->ldev->md.bm_offset); drbd_md_write() 3078 buffer->al_stripes = cpu_to_be32(device->ldev->md.al_stripes); drbd_md_write() 3079 buffer->al_stripe_size_4k = cpu_to_be32(device->ldev->md.al_stripe_size_4k); drbd_md_write() 3081 D_ASSERT(device, drbd_md_ss(device->ldev) == device->ldev->md.md_offset); drbd_md_write() 3082 sector = device->ldev->md.md_offset; drbd_md_write() 3119 /* Update device->ldev->md.la_size_sect, drbd_md_sync() 3121 device->ldev->md.la_size_sect = drbd_get_capacity(device->this_bdev); drbd_md_sync() 3176 struct drbd_md *in_core = &bdev->md; check_offsets_and_sizes() 3279 bdev->md.meta_dev_idx = bdev->disk_conf->meta_dev_idx; drbd_md_read() 3280 bdev->md.md_offset = drbd_md_ss(bdev); drbd_md_read() 3282 if (drbd_md_sync_page_io(device, bdev, bdev->md.md_offset, READ)) { drbd_md_read() 3303 drbd_err(device, "Found old (0.7) meta data magic. Did you \"drbdadm create-md\"?\n"); drbd_md_read() 3305 drbd_err(device, "Meta data magic not found. Did you \"drbdadm create-md\"?\n"); drbd_md_read() 3317 bdev->md.la_size_sect = be64_to_cpu(buffer->la_size_sect); drbd_md_read() 3319 bdev->md.uuid[i] = be64_to_cpu(buffer->uuid[i]); drbd_md_read() 3320 bdev->md.flags = be32_to_cpu(buffer->flags); drbd_md_read() 3321 bdev->md.device_uuid = be64_to_cpu(buffer->device_uuid); drbd_md_read() 3323 bdev->md.md_size_sect = be32_to_cpu(buffer->md_size_sect); drbd_md_read() 3324 bdev->md.al_offset = be32_to_cpu(buffer->al_offset); drbd_md_read() 3325 bdev->md.bm_offset = be32_to_cpu(buffer->bm_offset); drbd_md_read() 3327 if (check_activity_log_stripe_size(device, buffer, &bdev->md)) drbd_md_read() 3332 if (be32_to_cpu(buffer->bm_offset) != bdev->md.bm_offset) { drbd_md_read() 3334 be32_to_cpu(buffer->bm_offset), bdev->md.bm_offset); drbd_md_read() 3337 if (be32_to_cpu(buffer->md_size_sect) != bdev->md.md_size_sect) { drbd_md_read() 3339 be32_to_cpu(buffer->md_size_sect), bdev->md.md_size_sect); drbd_md_read() 3390 device->ldev->md.uuid[i+1] = device->ldev->md.uuid[i]; __must_hold() 3404 device->ldev->md.uuid[idx] = val; __must_hold() 3411 spin_lock_irqsave(&device->ldev->md.uuid_lock, flags); __must_hold() 3413 spin_unlock_irqrestore(&device->ldev->md.uuid_lock, flags); __must_hold() 3419 spin_lock_irqsave(&device->ldev->md.uuid_lock, flags); __must_hold() 3420 if (device->ldev->md.uuid[idx]) { __must_hold() 3422 device->ldev->md.uuid[UI_HISTORY_START] = device->ldev->md.uuid[idx]; __must_hold() 3425 spin_unlock_irqrestore(&device->ldev->md.uuid_lock, flags); __must_hold() 3442 spin_lock_irq(&device->ldev->md.uuid_lock); __must_hold() 3443 bm_uuid = device->ldev->md.uuid[UI_BITMAP]; __must_hold() 3448 device->ldev->md.uuid[UI_BITMAP] = device->ldev->md.uuid[UI_CURRENT]; __must_hold() 3450 spin_unlock_irq(&device->ldev->md.uuid_lock); __must_hold() 3460 if (device->ldev->md.uuid[UI_BITMAP] == 0 && val == 0) __must_hold() 3463 spin_lock_irqsave(&device->ldev->md.uuid_lock, flags); __must_hold() 3466 device->ldev->md.uuid[UI_HISTORY_START] = device->ldev->md.uuid[UI_BITMAP]; __must_hold() 3467 device->ldev->md.uuid[UI_BITMAP] = 0; __must_hold() 3469 unsigned long long bm_uuid = device->ldev->md.uuid[UI_BITMAP]; __must_hold() 3473 device->ldev->md.uuid[UI_BITMAP] = val & ~((u64)1); __must_hold() 3475 spin_unlock_irqrestore(&device->ldev->md.uuid_lock, flags); __must_hold() 3621 if ((device->ldev->md.flags & flag) != flag) { __must_hold() 3623 device->ldev->md.flags |= flag; __must_hold() 3629 if ((device->ldev->md.flags & flag) != 0) { __must_hold() 3631 device->ldev->md.flags &= ~flag; __must_hold() 3636 return (bdev->md.flags & flag) != 0; drbd_md_test_flag()
|
H A D | drbd_nl.c | 667 device->ldev->md.uuid[UI_CURRENT] &= ~(u64)1; drbd_set_role() 680 && device->ldev->md.uuid[UI_BITMAP] == 0) || forced) drbd_set_role() 683 device->ldev->md.uuid[UI_CURRENT] |= (u64)1; drbd_set_role() 751 /* Initializes the md.*_offset members, so we are able to find 776 unsigned int al_size_sect = bdev->md.al_size_4k * 8; drbd_md_set_sector_offsets() 778 bdev->md.md_offset = drbd_md_ss(bdev); drbd_md_set_sector_offsets() 780 switch (bdev->md.meta_dev_idx) { drbd_md_set_sector_offsets() 783 bdev->md.md_size_sect = MD_128MB_SECT; drbd_md_set_sector_offsets() 784 bdev->md.al_offset = MD_4kB_SECT; drbd_md_set_sector_offsets() 785 bdev->md.bm_offset = MD_4kB_SECT + al_size_sect; drbd_md_set_sector_offsets() 789 bdev->md.md_size_sect = drbd_get_capacity(bdev->md_bdev); drbd_md_set_sector_offsets() 790 bdev->md.al_offset = MD_4kB_SECT; drbd_md_set_sector_offsets() 791 bdev->md.bm_offset = MD_4kB_SECT + al_size_sect; drbd_md_set_sector_offsets() 796 bdev->md.al_offset = -al_size_sect; drbd_md_set_sector_offsets() 807 bdev->md.md_size_sect = md_size_sect; drbd_md_set_sector_offsets() 809 bdev->md.bm_offset = -md_size_sect + MD_4kB_SECT; drbd_md_set_sector_offsets() 876 struct drbd_md *md = &device->ldev->md; __must_hold() local 906 prev_size = device->ldev->md.md_size_sect; __must_hold() 907 la_size_sect = device->ldev->md.la_size_sect; __must_hold() 912 prev_al_stripes = md->al_stripes; __must_hold() 913 prev_al_stripe_size_4k = md->al_stripe_size_4k; __must_hold() 915 md->al_stripes = rs->al_stripes; __must_hold() 916 md->al_stripe_size_4k = rs->al_stripe_size / 4; __must_hold() 917 md->al_size_4k = (u64)rs->al_stripes * rs->al_stripe_size / 4; __must_hold() 961 device->ldev->md.la_size_sect = size; __must_hold() 968 la_size_changed = (la_size_sect != device->ldev->md.la_size_sect); __must_hold() 971 || prev_size != device->ldev->md.md_size_sect; __must_hold() 982 prev_flags = md->flags; __must_hold() 983 md->flags &= ~MDF_PRIMARY_IND; __must_hold() 987 la_size_changed && md_moved ? "size changed and md moved" : __must_hold() 988 la_size_changed ? "size changed" : "md moved"); __must_hold() 994 md->flags = prev_flags; __must_hold() 999 md->al_stripes, md->al_stripe_size_4k * 4); __must_hold() 1010 md->al_stripes = prev_al_stripes; __must_hold() 1011 md->al_stripe_size_4k = prev_al_stripe_size_4k; __must_hold() 1012 md->al_size_4k = (u64)prev_al_stripes * prev_al_stripe_size_4k; __must_hold() 1030 sector_t la_size_sect = bdev->md.la_size_sect; /* last agreed size. */ drbd_new_dev_size() 1299 unsigned int al_size_4k = bdev->md.al_size_4k; drbd_al_extents_max() 1411 device->ldev->md.flags &= ~MDF_AL_DISABLED; drbd_adm_disk_opts() 1413 device->ldev->md.flags |= MDF_AL_DISABLED; drbd_adm_disk_opts() 1511 spin_lock_init(&nbc->md.uuid_lock); drbd_adm_attach() 1634 drbd_warn(device, "refusing attach: md-device too small, " drbd_adm_attach() 1689 (device->ed_uuid & ~((u64)1)) != (nbc->md.uuid[UI_CURRENT] & ~((u64)1))) { drbd_adm_attach() 1704 drbd_new_dev_size(device, nbc, nbc->disk_conf->disk_size, 0) < nbc->md.la_size_sect) { drbd_adm_attach() 1827 device->ldev->md.flags &= ~MDF_AL_DISABLED; drbd_adm_attach() 1829 device->ldev->md.flags |= MDF_AL_DISABLED; drbd_adm_attach() 1856 device->ldev->md.uuid[UI_CURRENT] |= (u64)1; drbd_adm_attach() 1858 device->ldev->md.uuid[UI_CURRENT] &= ~(u64)1; drbd_adm_attach() 2516 rs.al_stripes = device->ldev->md.al_stripes; drbd_adm_resize() 2517 rs.al_stripe_size = device->ldev->md.al_stripe_size_4k * 4; drbd_adm_resize() 2554 if (device->ldev->md.al_stripes != rs.al_stripes || drbd_adm_resize() 2555 device->ldev->md.al_stripe_size_4k != rs.al_stripe_size / 4) { drbd_adm_resize() 2996 spin_lock_irq(&device->ldev->md.uuid_lock); nla_put_status_info() 2997 err = nla_put(skb, T_uuids, sizeof(si->uuids), device->ldev->md.uuid); nla_put_status_info() 2998 spin_unlock_irq(&device->ldev->md.uuid_lock); nla_put_status_info() 3003 if (nla_put_u32(skb, T_disk_flags, device->ldev->md.flags) || nla_put_status_info() 3360 device->ldev->md.uuid[UI_CURRENT] == UUID_JUST_CREATED && args.clear_bm) { drbd_adm_new_c_uuid()
|
H A D | drbd_proc.c | 108 * progress bars shamelessly adapted from driver/md/md.c 151 /* see drivers/md/md.c drbd_syncer_progress()
|
H A D | drbd_actlog.c | 205 drbd_alert(device, "%s [%d]:%s(,%llus,%s) out of range md access!\n", drbd_md_sync_page_io() 443 const unsigned int stripes = device->ldev->md.al_stripes; al_tr_number_to_on_disk_sector() 444 const unsigned int stripe_size_4kB = device->ldev->md.al_stripe_size_4k; al_tr_number_to_on_disk_sector() 447 unsigned int t = device->al_tr_number % (device->ldev->md.al_size_4k); al_tr_number_to_on_disk_sector() 456 return device->ldev->md.md_offset + device->ldev->md.al_offset + t; al_tr_number_to_on_disk_sector() 612 struct drbd_md *md = &device->ldev->md; drbd_initialize_al() local 613 sector_t al_base = md->md_offset + md->al_offset; drbd_initialize_al() 614 int al_size_4k = md->al_stripes * md->al_stripe_size_4k; drbd_initialize_al()
|
H A D | drbd_debugfs.c | 766 struct drbd_md *md; device_data_gen_id_show() local 772 md = &device->ldev->md; device_data_gen_id_show() 773 spin_lock_irq(&md->uuid_lock); device_data_gen_id_show() 775 seq_printf(m, "0x%016llX\n", md->uuid[idx]); device_data_gen_id_show() 777 spin_unlock_irq(&md->uuid_lock); device_data_gen_id_show()
|
H A D | drbd_int.h | 611 struct drbd_md md; member in struct:drbd_backing_dev 1188 * variables at create-md time (or even re-configurable at runtime?). 1815 switch (bdev->md.meta_dev_idx) { drbd_md_first_sector() 1818 return bdev->md.md_offset + bdev->md.bm_offset; drbd_md_first_sector() 1821 return bdev->md.md_offset; drbd_md_first_sector() 1831 switch (bdev->md.meta_dev_idx) { drbd_md_last_sector() 1834 return bdev->md.md_offset + MD_4kB_SECT -1; drbd_md_last_sector() 1837 return bdev->md.md_offset + bdev->md.md_size_sect -1; drbd_md_last_sector() 1860 switch (bdev->md.meta_dev_idx) { drbd_get_max_capacity() 1873 BM_EXT_TO_SECT(bdev->md.md_size_sect drbd_get_max_capacity() 1874 - bdev->md.bm_offset)); drbd_get_max_capacity() 1889 const int meta_dev_idx = bdev->md.meta_dev_idx; drbd_md_ss() 1901 return MD_128MB_SECT * bdev->md.meta_dev_idx; drbd_md_ss()
|
H A D | drbd_receiver.c | 2726 self = device->ldev->md.uuid[UI_BITMAP] & 1; __must_hold() 2940 self = device->ldev->md.uuid[UI_CURRENT] & ~((u64)1); __must_hold() 2960 if (device->p_uuid[UI_BITMAP] == (u64)0 && device->ldev->md.uuid[UI_BITMAP] != (u64)0) { __must_hold() 2965 if ((device->ldev->md.uuid[UI_BITMAP] & ~((u64)1)) == (device->p_uuid[UI_HISTORY_START] & ~((u64)1)) && __must_hold() 2966 (device->ldev->md.uuid[UI_HISTORY_START] & ~((u64)1)) == (device->p_uuid[UI_HISTORY_START + 1] & ~((u64)1))) { __must_hold() 2969 device->ldev->md.uuid[UI_HISTORY_START] = device->ldev->md.uuid[UI_BITMAP]; __must_hold() 2970 device->ldev->md.uuid[UI_BITMAP] = 0; __must_hold() 2972 drbd_uuid_dump(device, "self", device->ldev->md.uuid, __must_hold() 2983 if (device->ldev->md.uuid[UI_BITMAP] == (u64)0 && device->p_uuid[UI_BITMAP] != (u64)0) { __must_hold() 2988 if ((device->ldev->md.uuid[UI_HISTORY_START] & ~((u64)1)) == (device->p_uuid[UI_BITMAP] & ~((u64)1)) && __must_hold() 2989 (device->ldev->md.uuid[UI_HISTORY_START + 1] & ~((u64)1)) == (device->p_uuid[UI_HISTORY_START] & ~((u64)1))) { __must_hold() 3032 (device->ldev->md.uuid[UI_HISTORY_START] & ~((u64)1)) == __must_hold() 3052 self = device->ldev->md.uuid[UI_CURRENT] & ~((u64)1); __must_hold() 3060 self = device->ldev->md.uuid[UI_BITMAP] & ~((u64)1); __must_hold() 3066 self = device->ldev->md.uuid[UI_HISTORY_START] & ~((u64)1); __must_hold() 3069 (device->ldev->md.uuid[UI_HISTORY_START + 1] & ~((u64)1)) == __must_hold() 3071 self + UUID_NEW_BM_OFFSET == (device->ldev->md.uuid[UI_BITMAP] & ~((u64)1))) { __must_hold() 3078 __drbd_uuid_set(device, UI_BITMAP, device->ldev->md.uuid[UI_HISTORY_START]); __must_hold() 3079 __drbd_uuid_set(device, UI_HISTORY_START, device->ldev->md.uuid[UI_HISTORY_START + 1]); __must_hold() 3082 drbd_uuid_dump(device, "self", device->ldev->md.uuid, __must_hold() 3093 self = device->ldev->md.uuid[i] & ~((u64)1); __must_hold() 3099 self = device->ldev->md.uuid[UI_BITMAP] & ~((u64)1); __must_hold() 3106 self = device->ldev->md.uuid[i] & ~((u64)1); __must_hold() 3136 spin_lock_irq(&device->ldev->md.uuid_lock); __must_hold() 3137 drbd_uuid_dump(device, "self", device->ldev->md.uuid, device->comm_bm_set, 0); __must_hold() 3142 spin_unlock_irq(&device->ldev->md.uuid_lock); __must_hold() 3905 device->ldev->md.uuid[UI_CURRENT] == UUID_JUST_CREATED && receive_uuids()
|
H A D | drbd_bitmap.c | 620 if (ldev->md.al_offset == 8) drbd_md_on_disk_bits() 621 bitmap_sectors = ldev->md.md_size_sect - ldev->md.bm_offset; drbd_md_on_disk_bits() 623 bitmap_sectors = ldev->md.al_offset - ldev->md.bm_offset; drbd_md_on_disk_bits() 1003 device->ldev->md.md_offset + device->ldev->md.bm_offset; __must_hold()
|
H A D | drbd_state.c | 809 if (device->ed_uuid == device->ldev->md.uuid[UI_CURRENT]) { sanitize_state() 1121 u32 mdf = device->ldev->md.flags & ~(MDF_CONSISTENT|MDF_PRIMARY_IND| __drbd_set_state() 1139 if (mdf != device->ldev->md.flags) { __drbd_set_state() 1140 device->ldev->md.flags = mdf; __drbd_set_state() 1144 drbd_set_ed_uuid(device, device->ldev->md.uuid[UI_CURRENT]); __drbd_set_state() 1367 device->ldev->md.uuid[UI_BITMAP] == 0 && ns.disk >= D_UP_TO_DATE) { 1381 device->ldev->md.uuid[UI_BITMAP] == 0 && ns.disk >= D_UP_TO_DATE) {
|
H A D | drbd_worker.c | 953 drbd_uuid_set(device, UI_BITMAP, device->ldev->md.uuid[UI_CURRENT]); drbd_resync_finished() 970 device->p_uuid[i] = device->ldev->md.uuid[i]; drbd_resync_finished()
|
/linux-4.1.27/drivers/staging/lustre/lnet/selftest/ |
H A D | rpc.c | 361 lnet_md_t md; srpc_post_passive_rdma() local 372 md.threshold = 1; srpc_post_passive_rdma() 373 md.user_ptr = ev; srpc_post_passive_rdma() 374 md.start = buf; srpc_post_passive_rdma() 375 md.length = len; srpc_post_passive_rdma() 376 md.options = options; srpc_post_passive_rdma() 377 md.eq_handle = srpc_data.rpc_lnet_eq; srpc_post_passive_rdma() 379 rc = LNetMDAttach(meh, md, LNET_UNLINK, mdh); srpc_post_passive_rdma() 401 lnet_md_t md; srpc_post_active_rdma() local 403 md.user_ptr = ev; srpc_post_active_rdma() 404 md.start = buf; srpc_post_active_rdma() 405 md.length = len; srpc_post_active_rdma() 406 md.eq_handle = srpc_data.rpc_lnet_eq; srpc_post_active_rdma() 407 md.threshold = ((options & LNET_MD_OP_GET) != 0) ? 2 : 1; srpc_post_active_rdma() 408 md.options = options & ~(LNET_MD_OP_PUT | LNET_MD_OP_GET); srpc_post_active_rdma() 410 rc = LNetMDBind(md, LNET_UNLINK, mdh); srpc_post_active_rdma() 1407 srpc_event_t *rpcev = ev->md.user_ptr; srpc_lnet_ev_handler() 1476 buffer = container_of(ev->md.start, srpc_buffer_t, buf_msg); srpc_lnet_ev_handler()
|
/linux-4.1.27/crypto/ |
H A D | xor.c | 167 /* when built-in xor.o must initialize before drivers/md/md.o */
|
/linux-4.1.27/drivers/usb/gadget/function/ |
H A D | f_uvc.c | 795 struct uvc_color_matching_descriptor *md; uvc_alloc_inst() local 842 md = &opts->uvc_color_matching; uvc_alloc_inst() 843 md->bLength = UVC_DT_COLOR_MATCHING_SIZE; uvc_alloc_inst() 844 md->bDescriptorType = USB_DT_CS_INTERFACE; uvc_alloc_inst() 845 md->bDescriptorSubType = UVC_VS_COLORFORMAT; uvc_alloc_inst() 846 md->bColorPrimaries = 1; uvc_alloc_inst() 847 md->bTransferCharacteristics = 1; uvc_alloc_inst() 848 md->bMatrixCoefficients = 4; uvc_alloc_inst()
|
/linux-4.1.27/include/net/ |
H A D | vxlan.h | 104 struct vxlan_metadata *md); 150 __be16 src_port, __be16 dst_port, struct vxlan_metadata *md,
|
/linux-4.1.27/drivers/media/pci/ivtv/ |
H A D | ivtv-alsa.h | 4 * Copyright (C) 2009,2012 Andy Walls <awalls@md.metrocast.net>
|
H A D | ivtv-alsa-mixer.c | 5 * Copyright (C) 2009,2012 Andy Walls <awalls@md.metrocast.net>
|
H A D | ivtv-alsa-main.c | 4 * Copyright (C) 2009,2012 Andy Walls <awalls@md.metrocast.net>
|
H A D | ivtv-alsa-pcm.c | 5 * Copyright (C) 2009,2012 Andy Walls <awalls@md.metrocast.net>
|
/linux-4.1.27/arch/m68k/ifpsp060/src/ |
H A D | ilsp.S | 548 mov.l %d1,%d4 # md in d4 550 swap %d4 # hi(md) in lo d4 553 mulu.w %d1,%d0 # [1] lo(mr) * lo(md) 554 mulu.w %d3,%d1 # [2] hi(mr) * lo(md) 555 mulu.w %d4,%d2 # [3] lo(mr) * hi(md) 556 mulu.w %d4,%d3 # [4] hi(mr) * hi(md) 674 mov.l %d1,%d4 # md in d4 676 swap %d4 # hi(md) in lo d4 679 mulu.w %d1,%d0 # [1] lo(mr) * lo(md) 680 mulu.w %d3,%d1 # [2] hi(mr) * lo(md) 681 mulu.w %d4,%d2 # [3] lo(mr) * hi(md) 682 mulu.w %d4,%d3 # [4] hi(mr) * hi(md)
|
H A D | isp.S | 2584 mov.l %d4, %d7 # md in %d7 2586 swap %d7 # hi(md) in lo %d7 2589 mulu.w %d4, %d3 # [1] lo(mr) * lo(md) 2590 mulu.w %d6, %d4 # [2] hi(mr) * lo(md) 2591 mulu.w %d7, %d5 # [3] lo(mr) * hi(md) 2592 mulu.w %d7, %d6 # [4] hi(mr) * hi(md)
|
/linux-4.1.27/drivers/firmware/efi/libstub/ |
H A D | efi-stub-helper.c | 119 efi_memory_desc_t *md; get_dram_base() local 128 for_each_efi_memory_desc(&map, md) get_dram_base() 129 if (md->attribute & EFI_MEMORY_WB) get_dram_base() 130 if (membase > md->phys_addr) get_dram_base() 131 membase = md->phys_addr; get_dram_base()
|
/linux-4.1.27/tools/perf/ |
H A D | builtin-record.c | 72 struct perf_mmap *md = &rec->evlist->mmap[idx]; record__mmap_read() local 73 u64 head = perf_mmap__read_head(md); record__mmap_read() 74 u64 old = md->prev; record__mmap_read() 75 unsigned char *data = md->base + page_size; record__mmap_read() 87 if ((old & md->mask) + size != (head & md->mask)) { record__mmap_read() 88 buf = &data[old & md->mask]; record__mmap_read() 89 size = md->mask + 1 - (old & md->mask); record__mmap_read() 98 buf = &data[old & md->mask]; record__mmap_read() 107 md->prev = old; record__mmap_read()
|
/linux-4.1.27/drivers/net/ |
H A D | vxlan.c | 1170 struct vxlan_metadata md = {0}; vxlan_udp_encap_recv() local 1212 md.gbp = ntohs(gbp->policy_id); vxlan_udp_encap_recv() 1215 md.gbp |= VXLAN_GBP_DONT_LEARN; vxlan_udp_encap_recv() 1218 md.gbp |= VXLAN_GBP_POLICY_APPLIED; vxlan_udp_encap_recv() 1236 md.vni = vxh->vx_vni; vxlan_udp_encap_recv() 1237 vs->rcv(vs, skb, &md); vxlan_udp_encap_recv() 1255 struct vxlan_metadata *md) vxlan_rcv() 1266 vni = ntohl(md->vni) >> 8; vxlan_rcv() 1300 skb->mark = md->gbp; vxlan_rcv() 1651 struct vxlan_metadata *md) vxlan_build_gbp_hdr() 1655 if (!md->gbp) vxlan_build_gbp_hdr() 1661 if (md->gbp & VXLAN_GBP_DONT_LEARN) vxlan_build_gbp_hdr() 1664 if (md->gbp & VXLAN_GBP_POLICY_APPLIED) vxlan_build_gbp_hdr() 1667 gbp->policy_id = htons(md->gbp & VXLAN_GBP_ID_MASK); vxlan_build_gbp_hdr() 1676 struct vxlan_metadata *md, bool xnet, u32 vxflags) vxlan6_xmit_skb() 1725 vxh->vx_vni = md->vni; vxlan6_xmit_skb() 1744 vxlan_build_gbp_hdr(vxh, vxflags, md); vxlan6_xmit_skb() 1761 struct vxlan_metadata *md, bool xnet, u32 vxflags) vxlan_xmit_skb() 1804 vxh->vx_vni = md->vni; vxlan_xmit_skb() 1823 vxlan_build_gbp_hdr(vxh, vxflags, md); vxlan_xmit_skb() 1887 struct vxlan_metadata md; vxlan_xmit_one() local 1959 md.vni = htonl(vni << 8); vxlan_xmit_one() 1960 md.gbp = skb->mark; vxlan_xmit_one() 1964 src_port, dst_port, &md, vxlan_xmit_one() 2018 md.vni = htonl(vni << 8); vxlan_xmit_one() 2019 md.gbp = skb->mark; vxlan_xmit_one() 2022 0, ttl, src_port, dst_port, &md, vxlan_xmit_one() 1254 vxlan_rcv(struct vxlan_sock *vs, struct sk_buff *skb, struct vxlan_metadata *md) vxlan_rcv() argument 1650 vxlan_build_gbp_hdr(struct vxlanhdr *vxh, u32 vxflags, struct vxlan_metadata *md) vxlan_build_gbp_hdr() argument 1671 vxlan6_xmit_skb(struct dst_entry *dst, struct sock *sk, struct sk_buff *skb, struct net_device *dev, struct in6_addr *saddr, struct in6_addr *daddr, __u8 prio, __u8 ttl, __be16 src_port, __be16 dst_port, struct vxlan_metadata *md, bool xnet, u32 vxflags) vxlan6_xmit_skb() argument 1758 vxlan_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb, __be32 src, __be32 dst, __u8 tos, __u8 ttl, __be16 df, __be16 src_port, __be16 dst_port, struct vxlan_metadata *md, bool xnet, u32 vxflags) vxlan_xmit_skb() argument
|
/linux-4.1.27/drivers/clk/st/ |
H A D | clkgen-fsyn.c | 559 pr_debug("%s: %s new rate %ld [sdiv=0x%x,md=0x%x,pe=0x%x,nsdiv3=%u]\n", quadfs_pll_fs660c32_round_rate() 698 u32 md; member in struct:st_clk_quadfs_fsynth 711 * notice of the new md/pe values with a glitchless transition. quadfs_fsynth_program_enable() 722 * Ensure the md/pe parameters are ignored while we are quadfs_fsynth_program_rate() 728 CLKGEN_WRITE(fs, mdiv[fs->chan], fs->md); quadfs_fsynth_program_rate() 882 fs->md = params->mdiv; quadfs_fsynt_get_hw_value_for_recalc() 963 pr_debug("%s: %s new rate %ld [sdiv=0x%x,md=0x%x,pe=0x%x,nsdiv3=%u]\n", quadfs_round_rate() 975 fs->md = params->mdiv; quadfs_program_and_enable()
|
/linux-4.1.27/drivers/scsi/ |
H A D | mesh.c | 305 volatile struct dbdma_regs __iomem *md = ms->dma; mesh_dump_regs() local 310 ms, mr, md); mesh_dump_regs() 320 in_le32(&md->status), in_le32(&md->cmdptr)); mesh_dump_regs() 360 volatile struct dbdma_regs __iomem *md = ms->dma; mesh_init() local 366 out_le32(&md->control, (RUN|PAUSE|FLUSH|WAKE) << 16); /* stop dma */ mesh_init() 682 volatile struct dbdma_regs __iomem *md = ms->dma; start_phase() local 786 out_le32(&md->cmdptr, virt_to_phys(ms->dma_cmds)); start_phase() 787 out_le32(&md->control, (RUN << 16) | RUN); start_phase() 1320 volatile struct dbdma_regs __iomem *md = ms->dma; halt_dma() local 1329 && (in_le32(&md->status) & ACTIVE) != 0) { halt_dma() 1334 out_le32(&md->control, RUN << 16); /* turn off RUN bit */ halt_dma() 1707 volatile struct dbdma_regs __iomem *md = ms->dma; mesh_host_reset() local 1715 out_le32(&md->control, (RUN|PAUSE|FLUSH|WAKE) << 16); /* stop dma */ mesh_host_reset()
|
H A D | sg.c | 1670 struct rq_map_data *md, map_data; sg_start_req() local 1724 md = NULL; sg_start_req() 1726 md = &map_data; sg_start_req() 1728 if (md) { sg_start_req() 1737 md->pages = req_schp->pages; sg_start_req() 1738 md->page_order = req_schp->page_order; sg_start_req() 1739 md->nr_entries = req_schp->k_use_sg; sg_start_req() 1740 md->offset = 0; sg_start_req() 1741 md->null_mapped = hp->dxferp ? 0 : 1; sg_start_req() 1743 md->from_user = 1; sg_start_req() 1745 md->from_user = 0; sg_start_req() 1758 res = blk_rq_map_user_iov(q, rq, md, &i, GFP_ATOMIC); sg_start_req() 1761 res = blk_rq_map_user(q, rq, md, hp->dxferp, sg_start_req() 1767 if (!md) { sg_start_req()
|
/linux-4.1.27/drivers/iio/imu/ |
H A D | adis16480.c | 156 u16 md, year; adis16480_show_firmware_date() local 165 ret = adis_read_reg_16(&adis16480->adis, ADIS16480_REG_FIRM_DM, &md); adis16480_show_firmware_date() 170 md >> 8, md & 0xff, year); adis16480_show_firmware_date()
|
/linux-4.1.27/drivers/media/usb/hdpvr/ |
H A D | hdpvr-i2c.c | 8 * Copyright (C) 2010 Andy Walls <awalls@md.metrocast.net>
|
/linux-4.1.27/drivers/staging/lustre/lustre/lov/ |
H A D | lov_obd.c | 2190 void lov_stripe_lock(struct lov_stripe_md *md) 2191 __acquires(&md->lsm_lock) 2193 LASSERT(md->lsm_lock_owner != current_pid()); 2194 spin_lock(&md->lsm_lock); 2195 LASSERT(md->lsm_lock_owner == 0); 2196 md->lsm_lock_owner = current_pid(); 2200 void lov_stripe_unlock(struct lov_stripe_md *md) 2201 __releases(&md->lsm_lock) 2203 LASSERT(md->lsm_lock_owner == current_pid()); 2204 md->lsm_lock_owner = 0; 2205 spin_unlock(&md->lsm_lock);
|
/linux-4.1.27/drivers/crypto/ |
H A D | hifn_795x.c | 1196 u16 md = 0; hifn_setup_cmd_desc() local 1199 md |= HIFN_CRYPT_CMD_NEW_KEY; hifn_setup_cmd_desc() 1201 md |= HIFN_CRYPT_CMD_NEW_IV; hifn_setup_cmd_desc() 1205 md |= HIFN_CRYPT_CMD_MODE_ECB; hifn_setup_cmd_desc() 1208 md |= HIFN_CRYPT_CMD_MODE_CBC; hifn_setup_cmd_desc() 1211 md |= HIFN_CRYPT_CMD_MODE_CFB; hifn_setup_cmd_desc() 1214 md |= HIFN_CRYPT_CMD_MODE_OFB; hifn_setup_cmd_desc() 1224 md |= HIFN_CRYPT_CMD_KSZ_128 | hifn_setup_cmd_desc() 1230 md |= HIFN_CRYPT_CMD_KSZ_192 | hifn_setup_cmd_desc() 1236 md |= HIFN_CRYPT_CMD_KSZ_256 | hifn_setup_cmd_desc() 1242 md |= HIFN_CRYPT_CMD_ALG_3DES; hifn_setup_cmd_desc() 1247 md |= HIFN_CRYPT_CMD_ALG_DES; hifn_setup_cmd_desc() 1255 rctx->iv, rctx->ivsize, md); hifn_setup_cmd_desc()
|
/linux-4.1.27/arch/cris/arch-v32/drivers/ |
H A D | cryptocop.c | 428 cdesc->dma_descr->md = REG_TYPE_CONV(unsigned short int, struct strcop_meta_out, mo); create_pad_descriptor() 487 key_desc->dma_descr->md = REG_TYPE_CONV(unsigned short int, struct strcop_meta_out, mo); setup_key_dl_desc() 518 iv_desc->dma_descr->md = REG_TYPE_CONV(unsigned short int, struct strcop_meta_out, mo); setup_cipher_iv_desc() 580 outdesc->dma_descr->md = REG_TYPE_CONV(unsigned short int, struct strcop_meta_in, mi); create_input_descriptors() 596 outdesc->dma_descr->md = REG_TYPE_CONV(unsigned short int, struct strcop_meta_in, mi); create_input_descriptors() 642 cdesc->dma_descr->md = REG_TYPE_CONV(unsigned short int, struct strcop_meta_out, (*meta_out)); create_output_descriptors() 683 (*current_in_cdesc)->dma_descr->md = REG_TYPE_CONV(unsigned short int, struct strcop_meta_in, mi); append_input_descriptors() 687 (*current_in_cdesc)->dma_descr->md = REG_TYPE_CONV(unsigned short int, struct strcop_meta_in, mi); append_input_descriptors() 1242 ed->dma_descr->md = REG_TYPE_CONV(unsigned short int, struct strcop_meta_out, ed_mo); cryptocop_setup_dma_list() 3193 td->md, print_dma_descriptors() 3221 td->md, print_dma_descriptors() 3404 dd->md, print_user_dma_lists() 3435 dd->md, print_user_dma_lists()
|
/linux-4.1.27/drivers/staging/lustre/lustre/lclient/ |
H A D | lcommon_cl.c | 1085 * \param md new file metadata from MDS 1089 int cl_file_inode_init(struct inode *inode, struct lustre_md *md) cl_file_inode_init() argument 1099 .coc_md = md cl_file_inode_init() 1105 LASSERT(md->body->valid & OBD_MD_FLID); cl_file_inode_init() 1132 lli->lli_has_smd = lsm_has_objects(md->lsm); cl_file_inode_init()
|
/linux-4.1.27/drivers/video/fbdev/core/ |
H A D | modedb.c | 1181 const struct fb_videomode *m, *m1 = NULL, *md = NULL, *best = NULL; fb_find_best_display() local 1198 md = m; list_for_each() 1205 best = md; 1224 if (md) { 1225 best = md;
|
/linux-4.1.27/drivers/staging/rtl8723au/hal/ |
H A D | rtl8723au_recv.c | 175 pattrib->mdata = (u8)prxreport->md; update_recvframe_attrib()
|
/linux-4.1.27/drivers/staging/rtl8188eu/hal/ |
H A D | rtl8188e_rxdesc.c | 113 pattrib->mdata = (u8)((le32_to_cpu(report.rxdw1) >> 26) & 0x1);/* u8)prxreport->md; */ update_recvframe_attrib_88e()
|
/linux-4.1.27/crypto/async_tx/ |
H A D | raid6test.c | 5 * based on drivers/md/raid6test/test.c:
|
/linux-4.1.27/drivers/staging/lustre/lustre/obdecho/ |
H A D | echo_client.c | 970 struct lustre_md *md; cl_echo_object_find() local 972 md = &info->eti_md; cl_echo_object_find() 973 memset(md, 0, sizeof(*md)); cl_echo_object_find() 974 md->lsm = lsm; cl_echo_object_find() 975 conf->eoc_cl.u.coc_md = md; cl_echo_object_find() 1339 CERROR("Cannot allocate md: rc = %d\n", rc); echo_create_object()
|
/linux-4.1.27/drivers/media/tuners/ |
H A D | mt2063.c | 693 * ma mb mc md 723 u32 ma, mb, mc, md, me, mf; IsSpurInBand() local 747 md = (n * ((f_LO1 + hgds) / gd_Scale) - IsSpurInBand() 751 if (md >= pAS_Info->maxH1) IsSpurInBand() 758 if (md == ma) IsSpurInBand() 763 if (mc != md) { IsSpurInBand()
|
/linux-4.1.27/include/uapi/linux/ |
H A D | capability.h | 248 /* Allow administration of md devices (mostly the above, but some
|
/linux-4.1.27/drivers/media/platform/exynos4-is/ |
H A D | media-dev.c | 1343 strlcpy(v4l2_dev->name, "s5p-fimc-md", sizeof(v4l2_dev->name)); fimc_md_probe() 1455 { .name = "s5p-fimc-md" }, 1471 .name = "s5p-fimc-md",
|
/linux-4.1.27/net/wireless/ |
H A D | trace.h | 1877 __field(u16, md) 1883 __entry->md = ftie->md; 1886 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", md: 0x%x", 1887 WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->md)
|
/linux-4.1.27/drivers/net/wireless/ |
H A D | mac80211_hwsim.c | 899 struct mac80211_hwsim_addr_match_data *md = data; mac80211_hwsim_addr_iter() local 901 if (memcmp(mac, md->addr, ETH_ALEN) == 0) mac80211_hwsim_addr_iter() 902 md->ret = true; mac80211_hwsim_addr_iter() 908 struct mac80211_hwsim_addr_match_data md = { mac80211_hwsim_addr_match() local 915 memcpy(md.addr, addr, ETH_ALEN); mac80211_hwsim_addr_match() 920 &md); mac80211_hwsim_addr_match() 922 return md.ret; mac80211_hwsim_addr_match()
|
/linux-4.1.27/kernel/debug/kdb/ |
H A D | kdb_main.c | 156 "MDCOUNT=8", /* lines of md output */ 1031 * e.g., md1c20 should match md. 1465 * kdb_md - This function implements the 'md', 'md1', 'md2', 'md4', 1468 * md|mds [<addr arg> [<line count> [<radix>]]] 1572 /* Assume 'md <addr>' and start with environment values */ kdb_md() 1597 } else if (strcmp(argv[0], "md") == 0) kdb_md() 2813 kdb_register_flags("md", kdb_md, "<vaddr>", kdb_inittab()
|
/linux-4.1.27/drivers/staging/lustre/lustre/lmv/ |
H A D | lmv_obd.c | 2601 struct lustre_md *md) lmv_get_lustre_md() 2605 return md_get_lustre_md(lmv->tgts[0]->ltd_exp, req, dt_exp, md_exp, md); lmv_get_lustre_md() 2608 static int lmv_free_lustre_md(struct obd_export *exp, struct lustre_md *md) lmv_free_lustre_md() argument 2613 if (md->mea) lmv_free_lustre_md() 2614 obd_free_memmd(exp, (void *)&md->mea); lmv_free_lustre_md() 2615 return md_free_lustre_md(lmv->tgts[0]->ltd_exp, md); lmv_free_lustre_md() 2597 lmv_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req, struct obd_export *dt_exp, struct obd_export *md_exp, struct lustre_md *md) lmv_get_lustre_md() argument
|
/linux-4.1.27/lib/ |
H A D | inflate.c | 601 unsigned ml, md; /* masks for bl and bd bits */ inflate_codes() local 613 md = mask_bits[bd]; inflate_codes() 649 if ((e = (t = td + ((unsigned)b & md))->e) > 16) inflate_codes()
|
/linux-4.1.27/sound/oss/dmasound/ |
H A D | dmasound_core.c | 926 static int shared_resources_are_mine(fmode_t md) shared_resources_are_mine() argument 929 return (shared_resource_owner & md) != 0; shared_resources_are_mine() 931 shared_resource_owner = md ; shared_resources_are_mine()
|
/linux-4.1.27/drivers/staging/rtl8723au/include/ |
H A D | rtl8723a_hal.h | 435 u32 md:1; member in struct:rxreport_8723a
|
/linux-4.1.27/drivers/staging/lustre/lustre/include/ |
H A D | lclient.h | 379 int cl_file_inode_init(struct inode *inode, struct lustre_md *md);
|
H A D | obd_class.h | 1690 struct lustre_md *md) md_get_lustre_md() 1694 return MDP(exp->exp_obd, get_lustre_md)(exp, req, dt_exp, md_exp, md); md_get_lustre_md() 1698 struct lustre_md *md) md_free_lustre_md() 1702 return MDP(exp->exp_obd, free_lustre_md)(exp, md); md_free_lustre_md() 1686 md_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req, struct obd_export *dt_exp, struct obd_export *md_exp, struct lustre_md *md) md_get_lustre_md() argument 1697 md_free_lustre_md(struct obd_export *exp, struct lustre_md *md) md_free_lustre_md() argument
|
H A D | lustre_lib.h | 107 * For md echo client
|
H A D | obd.h | 240 void lov_stripe_lock(struct lov_stripe_md *md); 241 void lov_stripe_unlock(struct lov_stripe_md *md);
|
H A D | lu_object.h | 984 * Thread on md server
|
/linux-4.1.27/arch/arm64/mm/ |
H A D | mmu.c | 239 * mapping specified by 'md'.
|
/linux-4.1.27/drivers/isdn/hardware/eicon/ |
H A D | io.c | 196 DBG_FTL(("md 0x%08x|%08x resvd 0x%08x class 0x%08x", dump_trap_frame()
|
/linux-4.1.27/drivers/dma/ |
H A D | imx-sdma.c | 192 * @md: burst dma data register 210 u32 md; member in struct:sdma_context_data
|
/linux-4.1.27/drivers/scsi/ibmvscsi/ |
H A D | ibmvfc.c | 1304 * @md: memory descriptor list to initialize 1307 struct srp_direct_buf *md) ibmvfc_map_sg_list() 1313 md[i].va = cpu_to_be64(sg_dma_address(sg)); scsi_for_each_sg() 1314 md[i].len = cpu_to_be32(sg_dma_len(sg)); scsi_for_each_sg() 1315 md[i].key = 0; scsi_for_each_sg() 1306 ibmvfc_map_sg_list(struct scsi_cmnd *scmd, int nseg, struct srp_direct_buf *md) ibmvfc_map_sg_list() argument
|
H A D | ibmvscsi.c | 665 struct srp_direct_buf *md) map_sg_list() 672 struct srp_direct_buf *descr = md + i; scsi_for_each_sg() 664 map_sg_list(struct scsi_cmnd *cmd, int nseg, struct srp_direct_buf *md) map_sg_list() argument
|
/linux-4.1.27/drivers/md/bcache/ |
H A D | bcache.h | 11 * like a md raid array and its component devices. Most of the code doesn't care
|
/linux-4.1.27/drivers/media/i2c/cx25840/ |
H A D | cx25840-ir.c | 6 * Copyright (C) 2010 Andy Walls <awalls@md.metrocast.net>
|
/linux-4.1.27/block/ |
H A D | blk-settings.c | 165 * such as md or lvm) do not benefit from the processing on the
|
/linux-4.1.27/arch/sparc/kernel/ |
H A D | ds.c | 167 .service_id = "md-update",
|
/linux-4.1.27/drivers/staging/media/lirc/ |
H A D | lirc_zilog.c | 24 * Copyright (C) 2011 Andy Walls <awalls@md.metrocast.net>
|
/linux-4.1.27/fs/ |
H A D | compat_ioctl.c | 958 /* md calls this on random blockdevs */
|