Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-10]: src/sys/ufs/ffs Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/805192443400
branches:  netbsd-10
changeset: 374814:805192443400
user:      martin <martin%NetBSD.org@localhost>
date:      Sat May 13 12:20:49 2023 +0000

description:
Pull up following revision(s) (requested by chs in ticket #165):

        sys/ufs/ffs/ffs_snapshot.c: revision 1.155

ffs: apply the remaining ffs_snapshot.c part of this FreeBSD commit:
  commit 364ed814e7285c8216d8a201d3ab3674eb34ce29
  Author: Kirk McKusick <mckusick%FreeBSD.org@localhost>
  Date:   Thu Dec 9 21:24:00 2004 +0000
    Fixes a bug that caused UFS2 filesystems bigger than 2TB to
    prematurely report that they were full and/or to panic the kernel
    with the message ``ffs_clusteralloc: allocated out of group''.
    Submitted by:   Henry Whincup <henry%jot.to@localhost>
    MFC after:      1 week

all the other changes in that commit were applied previously by others:
 - sborrill commmitted ffs_alloc.c rev 1.123 in 2009
 - simonb committed ffs_alloc.c rev 1.110 in 2008
 - the ffs_clusteralloc() part is not needed because we no longer have
   that function.

fixes PR 57307

diffstat:

 sys/ufs/ffs/ffs_snapshot.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 5cf3eebebd92 -r 805192443400 sys/ufs/ffs/ffs_snapshot.c
--- a/sys/ufs/ffs/ffs_snapshot.c        Sat May 13 12:17:55 2023 +0000
+++ b/sys/ufs/ffs/ffs_snapshot.c        Sat May 13 12:20:49 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ffs_snapshot.c,v 1.154 2022/04/16 07:59:46 hannken Exp $       */
+/*     $NetBSD: ffs_snapshot.c,v 1.154.4.1 2023/05/13 12:20:49 martin Exp $    */
 
 /*
  * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.154 2022/04/16 07:59:46 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.154.4.1 2023/05/13 12:20:49 martin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -990,7 +990,7 @@ cgaccount1(int cg, struct vnode *vp, voi
                    fs->fs_bsize - fs->fs_cgsize);
        numblks = howmany(fs->fs_size, fs->fs_frag);
        len = howmany(fs->fs_fpg, fs->fs_frag);
-       base = cg * fs->fs_fpg / fs->fs_frag;
+       base = cgbase(fs, cg) / fs->fs_frag;
        if (base + len >= numblks)
                len = numblks - base - 1;
        loc = 0;



Home | Main Index | Thread Index | Old Index