| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: p2k.c,v 1.51 2011/01/07 11:15:30 pooka Exp $ */ | | 1 | /* $NetBSD: p2k.c,v 1.52 2011/01/07 15:30:09 pooka Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved. | | 4 | * Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved. |
5 | * | | 5 | * |
6 | * Development of this software was supported by the | | 6 | * Development of this software was supported by the |
7 | * Finnish Cultural Foundation. | | 7 | * Finnish Cultural Foundation. |
8 | * | | 8 | * |
9 | * Redistribution and use in source and binary forms, with or without | | 9 | * Redistribution and use in source and binary forms, with or without |
10 | * modification, are permitted provided that the following conditions | | 10 | * modification, are permitted provided that the following conditions |
11 | * are met: | | 11 | * are met: |
12 | * 1. Redistributions of source code must retain the above copyright | | 12 | * 1. Redistributions of source code must retain the above copyright |
13 | * notice, this list of conditions and the following disclaimer. | | 13 | * notice, this list of conditions and the following disclaimer. |
14 | * 2. Redistributions in binary form must reproduce the above copyright | | 14 | * 2. Redistributions in binary form must reproduce the above copyright |
| @@ -544,26 +544,33 @@ p2k_fs_statvfs(struct puffs_usermount *p | | | @@ -544,26 +544,33 @@ p2k_fs_statvfs(struct puffs_usermount *p |
544 | | | 544 | |
545 | /*ARGSUSED*/ | | 545 | /*ARGSUSED*/ |
546 | int | | 546 | int |
547 | p2k_fs_unmount(struct puffs_usermount *pu, int flags) | | 547 | p2k_fs_unmount(struct puffs_usermount *pu, int flags) |
548 | { | | 548 | { |
549 | struct p2k_mount *p2m = puffs_getspecific(pu); | | 549 | struct p2k_mount *p2m = puffs_getspecific(pu); |
550 | struct ukfs *fs = p2m->p2m_ukfs; | | 550 | struct ukfs *fs = p2m->p2m_ukfs; |
551 | int error = 0; | | 551 | int error = 0; |
552 | | | 552 | |
553 | rump_pub_vp_rele(p2m->p2m_rvp); | | 553 | rump_pub_vp_rele(p2m->p2m_rvp); |
554 | | | 554 | |
555 | if (fs) { | | 555 | if (fs) { |
556 | if (ukfs_release(fs, 0) != 0) { | | 556 | if (ukfs_release(fs, 0) != 0) { |
| | | 557 | struct statvfs svfsb; |
| | | 558 | |
| | | 559 | if (p2m->p2m_hasdebug |
| | | 560 | && p2k_fs_statvfs(pu, &svfsb) == 0) { |
| | | 561 | printf("\nSOFT UNMOUNT FAILED, MP INFO DUMP\n"); |
| | | 562 | rump_pub_vfs_mount_print(svfsb.f_mntonname, 1); |
| | | 563 | } |
557 | ukfs_release(fs, UKFS_RELFLAG_FORCE); | | 564 | ukfs_release(fs, UKFS_RELFLAG_FORCE); |
558 | error = 0; | | 565 | error = 0; |
559 | } | | 566 | } |
560 | } | | 567 | } |
561 | p2m->p2m_ukfs = NULL; | | 568 | p2m->p2m_ukfs = NULL; |
562 | | | 569 | |
563 | if (p2m->p2m_hasdebug) { | | 570 | if (p2m->p2m_hasdebug) { |
564 | printf("-- rump kernel event counters --\n"); | | 571 | printf("-- rump kernel event counters --\n"); |
565 | rump_printevcnts(); | | 572 | rump_printevcnts(); |
566 | printf("-- end of event counters --\n"); | | 573 | printf("-- end of event counters --\n"); |
567 | } | | 574 | } |
568 | | | 575 | |
569 | return error; | | 576 | return error; |