glops.c (f45b7ddd2bae1dc98e35c3611b55cba6d2a8da9e) | glops.c (8fb4b536e7b9dbaf7a6b8204e887b92a14e4352c) |
---|---|
1/* 2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 3 * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. 4 * 5 * This copyrighted material is made available to anyone wishing to use, 6 * modify, copy, or redistribute it subject to the terms and conditions 7 * of the GNU General Public License v.2. 8 */ --- 479 unchanged lines hidden (view full) --- 488 * Returns: 1 if it's ok 489 */ 490 491static int quota_go_demote_ok(struct gfs2_glock *gl) 492{ 493 return !atomic_read(&gl->gl_lvb_count); 494} 495 | 1/* 2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. 3 * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. 4 * 5 * This copyrighted material is made available to anyone wishing to use, 6 * modify, copy, or redistribute it subject to the terms and conditions 7 * of the GNU General Public License v.2. 8 */ --- 479 unchanged lines hidden (view full) --- 488 * Returns: 1 if it's ok 489 */ 490 491static int quota_go_demote_ok(struct gfs2_glock *gl) 492{ 493 return !atomic_read(&gl->gl_lvb_count); 494} 495 |
496struct gfs2_glock_operations gfs2_meta_glops = { | 496const struct gfs2_glock_operations gfs2_meta_glops = { |
497 .go_xmote_th = gfs2_glock_xmote_th, 498 .go_drop_th = gfs2_glock_drop_th, 499 .go_type = LM_TYPE_META 500}; 501 | 497 .go_xmote_th = gfs2_glock_xmote_th, 498 .go_drop_th = gfs2_glock_drop_th, 499 .go_type = LM_TYPE_META 500}; 501 |
502struct gfs2_glock_operations gfs2_inode_glops = { | 502const struct gfs2_glock_operations gfs2_inode_glops = { |
503 .go_xmote_th = inode_go_xmote_th, 504 .go_xmote_bh = inode_go_xmote_bh, 505 .go_drop_th = inode_go_drop_th, 506 .go_sync = inode_go_sync, 507 .go_inval = inode_go_inval, 508 .go_demote_ok = inode_go_demote_ok, 509 .go_lock = inode_go_lock, 510 .go_unlock = inode_go_unlock, 511 .go_greedy = inode_greedy, 512 .go_type = LM_TYPE_INODE 513}; 514 | 503 .go_xmote_th = inode_go_xmote_th, 504 .go_xmote_bh = inode_go_xmote_bh, 505 .go_drop_th = inode_go_drop_th, 506 .go_sync = inode_go_sync, 507 .go_inval = inode_go_inval, 508 .go_demote_ok = inode_go_demote_ok, 509 .go_lock = inode_go_lock, 510 .go_unlock = inode_go_unlock, 511 .go_greedy = inode_greedy, 512 .go_type = LM_TYPE_INODE 513}; 514 |
515struct gfs2_glock_operations gfs2_rgrp_glops = { | 515const struct gfs2_glock_operations gfs2_rgrp_glops = { |
516 .go_xmote_th = gfs2_glock_xmote_th, 517 .go_drop_th = gfs2_glock_drop_th, 518 .go_sync = meta_go_sync, 519 .go_inval = meta_go_inval, 520 .go_demote_ok = rgrp_go_demote_ok, 521 .go_lock = rgrp_go_lock, 522 .go_unlock = rgrp_go_unlock, 523 .go_type = LM_TYPE_RGRP 524}; 525 | 516 .go_xmote_th = gfs2_glock_xmote_th, 517 .go_drop_th = gfs2_glock_drop_th, 518 .go_sync = meta_go_sync, 519 .go_inval = meta_go_inval, 520 .go_demote_ok = rgrp_go_demote_ok, 521 .go_lock = rgrp_go_lock, 522 .go_unlock = rgrp_go_unlock, 523 .go_type = LM_TYPE_RGRP 524}; 525 |
526struct gfs2_glock_operations gfs2_trans_glops = { | 526const struct gfs2_glock_operations gfs2_trans_glops = { |
527 .go_xmote_th = trans_go_xmote_th, 528 .go_xmote_bh = trans_go_xmote_bh, 529 .go_drop_th = trans_go_drop_th, 530 .go_type = LM_TYPE_NONDISK 531}; 532 | 527 .go_xmote_th = trans_go_xmote_th, 528 .go_xmote_bh = trans_go_xmote_bh, 529 .go_drop_th = trans_go_drop_th, 530 .go_type = LM_TYPE_NONDISK 531}; 532 |
533struct gfs2_glock_operations gfs2_iopen_glops = { | 533const struct gfs2_glock_operations gfs2_iopen_glops = { |
534 .go_xmote_th = gfs2_glock_xmote_th, 535 .go_drop_th = gfs2_glock_drop_th, 536 .go_callback = gfs2_iopen_go_callback, 537 .go_type = LM_TYPE_IOPEN 538}; 539 | 534 .go_xmote_th = gfs2_glock_xmote_th, 535 .go_drop_th = gfs2_glock_drop_th, 536 .go_callback = gfs2_iopen_go_callback, 537 .go_type = LM_TYPE_IOPEN 538}; 539 |
540struct gfs2_glock_operations gfs2_flock_glops = { | 540const struct gfs2_glock_operations gfs2_flock_glops = { |
541 .go_xmote_th = gfs2_glock_xmote_th, 542 .go_drop_th = gfs2_glock_drop_th, 543 .go_type = LM_TYPE_FLOCK 544}; 545 | 541 .go_xmote_th = gfs2_glock_xmote_th, 542 .go_drop_th = gfs2_glock_drop_th, 543 .go_type = LM_TYPE_FLOCK 544}; 545 |
546struct gfs2_glock_operations gfs2_nondisk_glops = { | 546const struct gfs2_glock_operations gfs2_nondisk_glops = { |
547 .go_xmote_th = gfs2_glock_xmote_th, 548 .go_drop_th = gfs2_glock_drop_th, 549 .go_type = LM_TYPE_NONDISK 550}; 551 | 547 .go_xmote_th = gfs2_glock_xmote_th, 548 .go_drop_th = gfs2_glock_drop_th, 549 .go_type = LM_TYPE_NONDISK 550}; 551 |
552struct gfs2_glock_operations gfs2_quota_glops = { | 552const struct gfs2_glock_operations gfs2_quota_glops = { |
553 .go_xmote_th = gfs2_glock_xmote_th, 554 .go_drop_th = gfs2_glock_drop_th, 555 .go_demote_ok = quota_go_demote_ok, 556 .go_type = LM_TYPE_QUOTA 557}; 558 | 553 .go_xmote_th = gfs2_glock_xmote_th, 554 .go_drop_th = gfs2_glock_drop_th, 555 .go_demote_ok = quota_go_demote_ok, 556 .go_type = LM_TYPE_QUOTA 557}; 558 |
559struct gfs2_glock_operations gfs2_journal_glops = { | 559const struct gfs2_glock_operations gfs2_journal_glops = { |
560 .go_xmote_th = gfs2_glock_xmote_th, 561 .go_drop_th = gfs2_glock_drop_th, 562 .go_type = LM_TYPE_JOURNAL 563}; 564 | 560 .go_xmote_th = gfs2_glock_xmote_th, 561 .go_drop_th = gfs2_glock_drop_th, 562 .go_type = LM_TYPE_JOURNAL 563}; 564 |