Wed Aug 11 11:43:13 2010 UTC ()
Keep condvar wmesg's within 8-char limit


(pgoyette)
diff -r1.6 -r1.7 src/sys/fs/nilfs/nilfs_subr.c
diff -r1.3 -r1.4 src/sys/fs/nilfs/nilfs_vfsops.c

cvs diff -r1.6 -r1.7 src/sys/fs/nilfs/nilfs_subr.c (expand / switch to unified diff)

--- src/sys/fs/nilfs/nilfs_subr.c 2010/07/21 17:52:10 1.6
+++ src/sys/fs/nilfs/nilfs_subr.c 2010/08/11 11:43:13 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: nilfs_subr.c,v 1.6 2010/07/21 17:52:10 hannken Exp $ */ 1/* $NetBSD: nilfs_subr.c,v 1.7 2010/08/11 11:43:13 pgoyette Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2008, 2009 Reinoud Zandijk 4 * Copyright (c) 2008, 2009 Reinoud Zandijk
5 * All rights reserved. 5 * All rights reserved.
6 *  6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -18,27 +18,27 @@ @@ -18,27 +18,27 @@
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *  26 *
27 */ 27 */
28 28
29#include <sys/cdefs.h> 29#include <sys/cdefs.h>
30#ifndef lint 30#ifndef lint
31__KERNEL_RCSID(0, "$NetBSD: nilfs_subr.c,v 1.6 2010/07/21 17:52:10 hannken Exp $"); 31__KERNEL_RCSID(0, "$NetBSD: nilfs_subr.c,v 1.7 2010/08/11 11:43:13 pgoyette Exp $");
32#endif /* not lint */ 32#endif /* not lint */
33 33
34#include <sys/param.h> 34#include <sys/param.h>
35#include <sys/systm.h> 35#include <sys/systm.h>
36#include <sys/namei.h> 36#include <sys/namei.h>
37#include <sys/resourcevar.h> /* defines plimit structure in proc struct */ 37#include <sys/resourcevar.h> /* defines plimit structure in proc struct */
38#include <sys/kernel.h> 38#include <sys/kernel.h>
39#include <sys/file.h> /* define FWRITE ... */ 39#include <sys/file.h> /* define FWRITE ... */
40#include <sys/stat.h> 40#include <sys/stat.h>
41#include <sys/buf.h> 41#include <sys/buf.h>
42#include <sys/proc.h> 42#include <sys/proc.h>
43#include <sys/mount.h> 43#include <sys/mount.h>
44#include <sys/vnode.h> 44#include <sys/vnode.h>
@@ -831,27 +831,27 @@ nilfs_get_node_raw(struct nilfs_device * @@ -831,27 +831,27 @@ nilfs_get_node_raw(struct nilfs_device *
831 /* crosslink */ 831 /* crosslink */
832 node->vnode = nvp; 832 node->vnode = nvp;
833 node->ump = ump; 833 node->ump = ump;
834 node->nilfsdev = nilfsdev; 834 node->nilfsdev = nilfsdev;
835 nvp->v_data = node; 835 nvp->v_data = node;
836 836
837 /* initiase nilfs node */ 837 /* initiase nilfs node */
838 node->ino = ino; 838 node->ino = ino;
839 node->inode = *inode; 839 node->inode = *inode;
840 node->lockf = NULL; 840 node->lockf = NULL;
841 841
842 /* needed? */ 842 /* needed? */
843 mutex_init(&node->node_mutex, MUTEX_DEFAULT, IPL_NONE); 843 mutex_init(&node->node_mutex, MUTEX_DEFAULT, IPL_NONE);
844 cv_init(&node->node_lock, "nilfs_nlk"); 844 cv_init(&node->node_lock, "nilfsnlk");
845 845
846 /* initialise genfs */ 846 /* initialise genfs */
847 genfs_node_init(nvp, &nilfs_genfsops); 847 genfs_node_init(nvp, &nilfs_genfsops);
848 848
849 /* check if we're fetching the root */ 849 /* check if we're fetching the root */
850 if (ino == NILFS_ROOT_INO) 850 if (ino == NILFS_ROOT_INO)
851 nvp->v_vflag |= VV_ROOT; 851 nvp->v_vflag |= VV_ROOT;
852 852
853 /* update vnode's file type XXX is there a function for this? */ 853 /* update vnode's file type XXX is there a function for this? */
854 nvp->v_type = VREG; 854 nvp->v_type = VREG;
855 if (S_ISDIR(inode->i_mode)) 855 if (S_ISDIR(inode->i_mode))
856 nvp->v_type = VDIR; 856 nvp->v_type = VDIR;
857 if (S_ISLNK(inode->i_mode)) 857 if (S_ISLNK(inode->i_mode))

cvs diff -r1.3 -r1.4 src/sys/fs/nilfs/nilfs_vfsops.c (expand / switch to unified diff)

--- src/sys/fs/nilfs/nilfs_vfsops.c 2010/06/24 13:03:10 1.3
+++ src/sys/fs/nilfs/nilfs_vfsops.c 2010/08/11 11:43:13 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: nilfs_vfsops.c,v 1.3 2010/06/24 13:03:10 hannken Exp $ */ 1/* $NetBSD: nilfs_vfsops.c,v 1.4 2010/08/11 11:43:13 pgoyette Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2008, 2009 Reinoud Zandijk 4 * Copyright (c) 2008, 2009 Reinoud Zandijk
5 * All rights reserved. 5 * All rights reserved.
6 *  6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -18,27 +18,27 @@ @@ -18,27 +18,27 @@
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *  26 *
27 */ 27 */
28 28
29#include <sys/cdefs.h> 29#include <sys/cdefs.h>
30#ifndef lint 30#ifndef lint
31__KERNEL_RCSID(0, "$NetBSD: nilfs_vfsops.c,v 1.3 2010/06/24 13:03:10 hannken Exp $"); 31__KERNEL_RCSID(0, "$NetBSD: nilfs_vfsops.c,v 1.4 2010/08/11 11:43:13 pgoyette Exp $");
32#endif /* not lint */ 32#endif /* not lint */
33 33
34 34
35#if defined(_KERNEL_OPT) 35#if defined(_KERNEL_OPT)
36#include "opt_compat_netbsd.h" 36#include "opt_compat_netbsd.h"
37#endif 37#endif
38 38
39#include <sys/param.h> 39#include <sys/param.h>
40#include <sys/systm.h> 40#include <sys/systm.h>
41#include <sys/sysctl.h> 41#include <sys/sysctl.h>
42#include <sys/namei.h> 42#include <sys/namei.h>
43#include <sys/proc.h> 43#include <sys/proc.h>
44#include <sys/kernel.h> 44#include <sys/kernel.h>
@@ -622,27 +622,27 @@ nilfs_mount_device(struct vnode *devvp,  @@ -622,27 +622,27 @@ nilfs_mount_device(struct vnode *devvp,
622 vrele(devvp); 622 vrele(devvp);
623 return error; 623 return error;
624 } 624 }
625 625
626 /* opened ok, try mounting */ 626 /* opened ok, try mounting */
627 nilfsdev = malloc(sizeof(struct nilfs_device), M_NILFSMNT, M_WAITOK); 627 nilfsdev = malloc(sizeof(struct nilfs_device), M_NILFSMNT, M_WAITOK);
628 KASSERT(nilfsdev); 628 KASSERT(nilfsdev);
629 629
630 /* initialise */ 630 /* initialise */
631 memset(nilfsdev, 0, sizeof(struct nilfs_device)); 631 memset(nilfsdev, 0, sizeof(struct nilfs_device));
632 nilfsdev->refcnt = 1; 632 nilfsdev->refcnt = 1;
633 nilfsdev->devvp = devvp; 633 nilfsdev->devvp = devvp;
634 nilfsdev->uncomitted_bl = 0; 634 nilfsdev->uncomitted_bl = 0;
635 cv_init(&nilfsdev->sync_cv, "nilfssync"); 635 cv_init(&nilfsdev->sync_cv, "nilfsisyn");
636 STAILQ_INIT(&nilfsdev->mounts); 636 STAILQ_INIT(&nilfsdev->mounts);
637 637
638 /* get our device's size */ 638 /* get our device's size */
639 error = VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, NOCRED); 639 error = VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, NOCRED);
640 if (error) { 640 if (error) {
641 /* remove all our information */ 641 /* remove all our information */
642 nilfs_unmount_device(nilfsdev); 642 nilfs_unmount_device(nilfsdev);
643 return EINVAL; 643 return EINVAL;
644 } 644 }
645 nilfsdev->devsize = dpart.part->p_size * dpart.disklab->d_secsize; 645 nilfsdev->devsize = dpart.part->p_size * dpart.disklab->d_secsize;
646 646
647 /* register nilfs_device in list */ 647 /* register nilfs_device in list */
648 SLIST_INSERT_HEAD(&nilfs_devices, nilfsdev, next_device); 648 SLIST_INSERT_HEAD(&nilfs_devices, nilfsdev, next_device);