Date: Thu, 20 Aug 2009 16:06:46 GMT From: Aditya Sarawgi <truncs@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 167542 for review Message-ID: <200908201606.n7KG6jko056707@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=167542 Change 167542 by truncs@aditya on 2009/08/20 16:05:51 Change IO_SYNC to B_SYNC. Affected files ... .. //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_inode.c#5 edit Differences ... ==== //depot/projects/soc2009/soc_ext2fs/src/sys/gnu/fs/ext2fs/ext2_inode.c#5 (text+ko) ==== @@ -152,7 +152,6 @@ } fs = oip->i_e2fs; osize = oip->i_size; - ext2_discard_prealloc(oip); /* * Lengthen the size of the file. We must ensure that the * last byte of the file is allocated. Since the smallest @@ -164,13 +163,13 @@ offset = blkoff(fs, length - 1); lbn = lblkno(fs, length - 1); aflags = B_CLRBUF; - if (flags & IO_SYNC) + if (flags & B_SYNC) aflags |= B_SYNC; - vnode_pager_setsize(ovp, length); if ((error = ext2_balloc(oip, lbn, offset + 1, cred, &bp, aflags)) != 0) return (error); oip->i_size = length; + vnode_pager_setsize(ovp, length); if (aflags & IO_SYNC) bwrite(bp); else @@ -201,11 +200,12 @@ size = blksize(fs, oip, lbn); bzero((char *)bp->b_data + offset, (u_int)(size - offset)); allocbuf(bp, size); - if (aflags & IO_SYNC) + if (aflags & B_SYNC) bwrite(bp); else bawrite(bp); } + vnode_pager_setsize(ovp, length); /* * Calculate index into inode's block list of * last direct and indirect blocks (if any) @@ -470,7 +470,6 @@ struct thread *td = ap->a_td; int mode, error = 0; - ext2_discard_prealloc(ip); if (prtactive && vrefcnt(vp) != 0) vprint("ext2_inactive: pushing active", vp);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908201606.n7KG6jko056707>