From owner-freebsd-fs Sun Jun 10 13:23:12 2001 Delivered-To: freebsd-fs@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id B22C737B407; Sun, 10 Jun 2001 13:23:02 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (robert@fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.11.3/8.11.3) with SMTP id f5AKMof34638; Sun, 10 Jun 2001 16:22:50 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Sun, 10 Jun 2001 16:22:49 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Ruslan Ermilov Cc: "Alexey V. Neyman" , Poul-Henning Kamp , fs@FreeBSD.org Subject: Re: man VOP_ACCESS(9), suser(9) In-Reply-To: <20010609144612.H87114@sunbay.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The VOP_*(9) man pages have been sadly trailing reality, and there are also several undocumented VOP's that could use documentation. The authorization code in -CURRENT's various VOP_ACCESS() code bits could still use some tweaking, to be honest. Robert N M Watson FreeBSD Core Team, TrustedBSD Project robert@fledge.watson.org NAI Labs, Safeport Network Services On Sat, 9 Jun 2001, Ruslan Ermilov wrote: > On Sat, Jun 09, 2001 at 03:27:33PM +0400, Alexey V. Neyman wrote: > > Hello there! > > > > >From pseudo-code in VOP_ACCESS(9): > > /* Otherwise, user id 0 always gets access. */ > > if (cred->cr_uid == 0) > > return 0; > > > > Shouldn't this check be changed to suser() or suser_xxx() to check against > > super-user privileges? > > > Yes, much probably. Actually, the code in -CURRENT uses vaccess() from > the vfs_subr.c, and the latter uses suser_xxx(), but the VOP_ACCESS(9)'s > PSEUDOCODE section of manpage hasn't (yet?) been updated. The code in > -STABLE really uses cr_uid == 0 (see ufs_vnops.c), and this probably > should be fixed. > > Over to VFS geeks. :-) > > > Cheers, > -- > Ruslan Ermilov Oracle Developer/DBA, > ru@sunbay.com Sunbay Software AG, > ru@FreeBSD.org FreeBSD committer, > +380.652.512.251 Simferopol, Ukraine > > http://www.FreeBSD.org The Power To Serve > http://www.oracle.com Enabling The Information Age > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-fs" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Mon Jun 11 10: 0:58 2001 Delivered-To: freebsd-fs@freebsd.org Received: from cobweb.example.org (par-ilm-dhcp1-vl132-35.cisco.com [144.254.57.230]) by hub.freebsd.org (Postfix) with SMTP id A284337B401 for ; Mon, 11 Jun 2001 10:00:55 -0700 (PDT) (envelope-from molter@tin.it) Received: (qmail 38790 invoked by uid 1000); 11 Jun 2001 17:02:14 -0000 Date: Mon, 11 Jun 2001 19:02:14 +0200 From: Marco Molteni To: freebsd-fs@freebsd.org Cc: Boris Popov Subject: Re: MSDOS FS and flock? Message-ID: <20010611190214.A38726@cobweb.example.org> References: <200011201400.eAKE0T613531@nil.science-factory.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from bp@butya.kz on Tue, Nov 21, 2000 at 08:31:46AM +0600 Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 2000-11-21, Boris Popov wrote: > On Mon, 20 Nov 2000, Marc van Woerkom wrote: > > > I wonder why Emacs' movemail program is not able to move mail on a > > MSDOS partion. Under Linux this seems to be no problem. > > > > My guess is that msdosfs does not allow flock(). > > Yes, msdosfs doesn't implement advisory locks. Attached you'll > find a diff against recent -current (but should work on -stable > too) which adds necessary VOP to msdosfs. [..] Hi, I have the same problem as Marc's, i.e. the msdos filesystem doesn't allow file locking (at least on FreeBSD 4.3 which I am using). I did a search in the various FreeBSD mailing list and the only answer I only got was the thread I quoted, started by http://docs.freebsd.org/cgi/getmsg.cgi?fetch=19625+0+archive/2000/freebsd-fs/20001126.freebsd-fs My questions are: any news on that, or the only fix is to apply the patch provided by Boris? any workaround/ideas to be able to share data (specifically, email files in mbox format) on a dual-boot machine between windows and FreeBSD? thanks Marco To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Mon Jun 11 20: 6:30 2001 Delivered-To: freebsd-fs@freebsd.org Received: from relay.butya.kz (butya-gw.butya.kz [212.154.129.94]) by hub.freebsd.org (Postfix) with ESMTP id A1DDF37B403 for ; Mon, 11 Jun 2001 20:06:26 -0700 (PDT) (envelope-from bp@butya.kz) Received: by relay.butya.kz (Postfix, from userid 1000) id A8EAE28773; Tue, 12 Jun 2001 10:06:24 +0700 (ALMST) Received: from localhost (localhost [127.0.0.1]) by relay.butya.kz (Postfix) with ESMTP id 94BA82862D; Tue, 12 Jun 2001 10:06:24 +0700 (ALMST) Date: Tue, 12 Jun 2001 10:06:24 +0700 (ALMST) From: Boris Popov To: Marco Molteni Cc: freebsd-fs@freebsd.org Subject: Re: MSDOS FS and flock? In-Reply-To: <20010611190214.A38726@cobweb.example.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, 11 Jun 2001, Marco Molteni wrote: > I have the same problem as Marc's, i.e. the msdos filesystem doesn't > allow file locking (at least on FreeBSD 4.3 which I am using). [skip] > any news on that, or the only fix is to apply the patch provided by Boris? There was a timeout to see if someone submit another patch. Looks like there is no such thing and this diff can be applied. -- Boris Popov http://www.butya.kz/~bp/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Wed Jun 13 0:49:51 2001 Delivered-To: freebsd-fs@freebsd.org Received: from cms3.etri.re.kr (cms3.etri.re.kr [129.254.16.13]) by hub.freebsd.org (Postfix) with ESMTP id BE4C737B401 for ; Wed, 13 Jun 2001 00:49:37 -0700 (PDT) (envelope-from jdscol92@etri.re.kr) Received: by cms3.etri.re.kr with Internet Mail Service (5.5.2653.19) id ; Wed, 13 Jun 2001 16:48:36 +0900 Message-ID: <766FA1FC5C2AD511B3C800D0B7A8AC4A391283@cms3.etri.re.kr> From: jdscol92@etri.re.kr To: freebsd-fs@freebsd.org Subject: 'b_dep' in buffer structure....?? Date: Wed, 13 Jun 2001 16:48:32 +0900 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C0F3DD.3E2EF280" Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C0F3DD.3E2EF280 Content-Type: text/plain; charset="euc-kr" HI.. I have some question about the meaning of buffer flag, "b_dep" ... There is a comment in source code(buf.h) as follows ... "List of filesystem dependencies" 1. In this comment, what does the 'filesystem dependencies' mean? 2. In the code about buffer operations, you can see 'b_dep' flag marked NOT NULL or NULL. ( b_dep!=NULL or b_dep==NULL).. What does the code, 'b_dep!=NULL or b_dep==NULL', mean? 3. Which routine is called when buffer's data is written to the disk( due to 'bwrite' or write back )?? I have found bwrite(), bdwrite(), bawrite() etc..routines, but I don't know which routine does actually write buffer's data to disk. Does 'softdep_disk_write_complete()' routine in bio_ops bioops structure write buffer's data to disk ?? Thanks in advance.... Have a good day....!! ------_=_NextPart_001_01C0F3DD.3E2EF280 Content-Type: text/html; charset="euc-kr" Content-Transfer-Encoding: quoted-printable 'b_dep' in buffer structure....??

HI..

I have some question about the meaning of buffer = flag, "b_dep" ...
There is a comment in source code(buf.h) as follows = ...

"List of filesystem dependencies"

1. In this comment, what does the 'filesystem = dependencies' mean?

2. In the code about buffer operations, you can see = 'b_dep' flag marked NOT NULL or NULL.
        ( = b_dep!=3DNULL  or  b_dep=3D=3DNULL)..

         What = does the code, 'b_dep!=3DNULL  or  b_dep=3D=3DNULL', = mean?

3. Which routine is called when buffer's data is = written to the disk( due to 'bwrite' or write back )??
        I have = found bwrite(), bdwrite(), bawrite() etc..routines,
        but I = don't know which routine does actually write buffer's data to = disk.
        Does = 'softdep_disk_write_complete()' routine in bio_ops bioops structure = write buffer's data to disk ??

Thanks in advance....
Have a good day....!!

------_=_NextPart_001_01C0F3DD.3E2EF280-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Thu Jun 14 1:42:32 2001 Delivered-To: freebsd-fs@freebsd.org Received: from critter.freebsd.dk (fxp0.halvsten.ip.cybercity.dk [212.242.40.114]) by hub.freebsd.org (Postfix) with ESMTP id 6BADA37B401 for ; Thu, 14 Jun 2001 01:42:29 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.3/8.11.3) with ESMTP id f5E75Wr56518; Thu, 14 Jun 2001 09:05:32 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: jdscol92@etri.re.kr Cc: freebsd-fs@FreeBSD.ORG Subject: Re: 'b_dep' in buffer structure....?? In-Reply-To: Your message of "Wed, 13 Jun 2001 16:48:32 +0900." <766FA1FC5C2AD511B3C800D0B7A8AC4A391283@cms3.etri.re.kr> Date: Thu, 14 Jun 2001 09:05:31 +0200 Message-ID: <56516.992502331@critter> From: Poul-Henning Kamp Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org In message <766FA1FC5C2AD511B3C800D0B7A8AC4A391283@cms3.etri.re.kr>, jdscol92@e tri.re.kr writes: >This message is in MIME format. Since your mail reader does not understand >this format, some or all of this message may not be legible. > >------_=_NextPart_001_01C0F3DD.3E2EF280 >Content-Type: text/plain; > charset="euc-kr" > >HI.. > >I have some question about the meaning of buffer flag, "b_dep" ... >There is a comment in source code(buf.h) as follows ... > >"List of filesystem dependencies" > >1. In this comment, what does the 'filesystem dependencies' mean? > >2. In the code about buffer operations, you can see 'b_dep' flag marked NOT >NULL or NULL. > ( b_dep!=NULL or b_dep==NULL).. > > What does the code, 'b_dep!=NULL or b_dep==NULL', mean? Can you give a precise file + line number ? PS: don't send HTML email to our lists. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Thu Jun 14 6:12:49 2001 Delivered-To: freebsd-fs@freebsd.org Received: from raven.ravenbrook.com (raven.ravenbrook.com [193.82.131.18]) by hub.freebsd.org (Postfix) with ESMTP id A37FF37B61C for ; Thu, 14 Jun 2001 06:12:17 -0700 (PDT) (envelope-from nb@ravenbrook.com) Received: from thrush.ravenbrook.com (thrush.ravenbrook.com [193.112.141.249]) by raven.ravenbrook.com (8.9.3/8.9.3) with ESMTP id OAA21747 for ; Thu, 14 Jun 2001 14:11:48 +0100 (BST) Received: from thrush.ravenbrook.com (localhost [127.0.0.1]) by thrush.ravenbrook.com (8.11.3/8.11.2) with ESMTP id f5EDBvl09910 for ; Thu, 14 Jun 2001 14:11:58 +0100 (BST) (envelope-from nb@thrush.ravenbrook.com) From: Nick Barnes To: freebsd-fs@freebsd.org Subject: FFS fs_maxfilesize Date: Thu, 14 Jun 2001 14:11:57 +0100 Message-ID: <9908.992524317@thrush.ravenbrook.com> Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org fs_maxfilesize is computed as follows (sbin/newfs/mkfs.c): sblock.fs_maxfilesize = sblock.fs_bsize * NDADDR - 1; for (sizepb = sblock.fs_bsize, i = 0; i < NIADDR; i++) { sizepb *= NINDIR(&sblock); sblock.fs_maxfilesize += sizepb; } For the default values (bsize = 2^13, NINDIR = 2^11), this gives a number slightly over 2^46 (64 TB), and indeed that's what I see in this field on my filesystems. But when I try to create an exceedingly large file (by lseek()ing a long way and writing 4 bytes), it tops out with EFBIG at a little bit bigger than 2^24 (4 TB). By my reckoning, this is also the maximum size of the actual filesystem (with default fsize (2^10) and ufs_daddr_t a 32-bit type). So should the computation of maxfilesize be corrected? Incidentally, where is this EFBIG coming from? I can't find an instance of EFBIG in the sources which is not derived from either fs_maxfilesize or from RLIMIT_FSIZE (which is RLIMIT_INFINITY). Nick B #include #include #include #include #include #include int main(void) { off_t n; off_t off; int fd; int i; fd = open("foo", O_CREAT | O_RDWR); n = 1024; i = 10; for (;;) { ssize_t bytes; char buf[] = "\0\0\0\0"; off = lseek(fd, n, SEEK_SET); printf("seek to %qd (2^%ld) returned %qd\n", n, i, off); if (off < 0) err(1, "lseek failed"); bytes = write(fd, buf, 4); printf("write of 4 bytes returned %ld\n", bytes); if (bytes < 0) err(1, "write failed"); n *= 2; ++i; } return 0; } ... seek to 549755813888 (2^39) returned 549755813888 write of 4 bytes returned 4 seek to 1099511627776 (2^40) returned 1099511627776 write of 4 bytes returned 4 seek to 2199023255552 (2^41) returned 2199023255552 write of 4 bytes returned 4 seek to 4398046511104 (2^42) returned 4398046511104 write of 4 bytes returned 4 seek to 8796093022208 (2^43) returned 8796093022208 write of 4 bytes returned -1 a.out: write failed: File too large $ ls -l foo -rw-rw-r-- 1 nb nb 4398046511108 Jun 14 14:08 foo To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Thu Jun 14 8:24:13 2001 Delivered-To: freebsd-fs@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id E808437B403 for ; Thu, 14 Jun 2001 08:24:09 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 14 Jun 2001 16:24:09 +0100 (BST) To: Nick Barnes Cc: freebsd-fs@freebsd.org Subject: Re: FFS fs_maxfilesize In-Reply-To: Your message of "Thu, 14 Jun 2001 14:11:57 BST." <9908.992524317@thrush.ravenbrook.com> Date: Thu, 14 Jun 2001 16:24:08 +0100 From: Ian Dowse Message-ID: <200106141624.aa46907@salmon.maths.tcd.ie> Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org In message <9908.992524317@thrush.ravenbrook.com>, Nick Barnes writes: >But when I try to create an exceedingly large file (by lseek()ing a >long way and writing 4 bytes), it tops out with EFBIG at a little bit >bigger than 2^24 (4 TB). By my reckoning, this is also the maximum >size of the actual filesystem (with default fsize (2^10) and >ufs_daddr_t a 32-bit type). > >So should the computation of maxfilesize be corrected? No, fs_maxfilesize correctly contains the maximum file size supported by the filesystem; it is the kernel that currently cannot deal with more than 2^31 logical blocks, so it further limits the file size. It actually limits the file size to 2^30 logical blocks for safety - I think Bruce Evans once mentioned some place in ffs_fsync() where this helps avoid an overflow. So the file-size limit that is actually enforced is the lesser of the following two limits: 1) fs_maxfilesize, as determined by NIADDR, NDADDR, block size when the filesystem is first created. For NIADDR=3, NDADDR=12, block size B, this is: B*12 + B^2/4 + B^3/4^2 + B^4/4^3 2) The kernel limit of 2^30 logical blocks. For block size B that is: B * 2^30 - 1 For a filesystem with 8k blocks, these work out as 70403120791552 bytes (~64TB) and 8796093022207 bytes (~8TB) respectively. With 4k blocks, the fs_maxfilesize limit is smaller than the LBN one. The kernel code for limiting the file size is a bit strange - it changes the value of fs_maxfilesize in the in-core superblock, and changes it back before writing the superblock back to disk. The relevant code is in ffs_vfsops.c: ump->um_savedmaxfilesize = fs->fs_maxfilesize; /* XXX */ maxfilesize = (u_int64_t)0x40000000 * fs->fs_bsize - 1; /* XXX */ if (fs->fs_maxfilesize > maxfilesize) /* XXX */ fs->fs_maxfilesize = maxfilesize; /* XXX */ At some point, the kernel could be changed to allow files with more than 2^31 logical blocks, so the superblock fs_maxfilesize field should specify only the filesystem-induced limit and not reflect the current kernel limitations. Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Fri Jun 15 17:24: 6 2001 Delivered-To: freebsd-fs@freebsd.org Received: from cms3.etri.re.kr (cms3.etri.re.kr [129.254.16.13]) by hub.freebsd.org (Postfix) with ESMTP id 8FE8D37B405 for ; Fri, 15 Jun 2001 17:23:57 -0700 (PDT) (envelope-from jdscol92@etri.re.kr) Received: by cms3.etri.re.kr with Internet Mail Service (5.5.2653.19) id ; Sat, 16 Jun 2001 09:22:48 +0900 Message-ID: <766FA1FC5C2AD511B3C800D0B7A8AC4A391289@cms3.etri.re.kr> From: jdscol92@etri.re.kr To: phk@critter.freebsd.dk, jdscol92@etri.re.kr Cc: freebsd-fs@FreeBSD.ORG Subject: =?euc-kr?B?W8D8w7zIuL3FXSBSZTogJ2JfZGVwJyBpbiBidWZmZXIgc3RydWN0?= =?euc-kr?B?dXJlLi4uLj8/?= Date: Sat, 16 Jun 2001 09:22:47 +0900 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C0F5FA.7851A6A0" Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C0F5FA.7851A6A0 Content-Type: text/plain; charset="euc-kr" Thank you for being concerned about my qeuestions. the precise file + line number is as follows. The version of FreeBSD is 4.3 Release. >HI.. > >I have some question about the meaning of buffer flag, "b_dep" ... >There is a comment in source code(buf.h) as follows ... > >"List of filesystem dependencies" ==> /sys/sys/buf.h + 144 line (defined) > >1. In this comment, what does the 'filesystem dependencies' mean? > >2. In the code about buffer operations, you can see 'b_dep' flag marked NOT >NULL or NULL. ( b_dep!=NULL or b_dep==NULL).. > > What does the code, 'b_dep!=NULL or b_dep==NULL', mean? ==> /sys/kern/vfs_bio.c + 664, 733, 735, 1003, 1637 lines etc.... ==> /sys/ufs/ffs/ffs_softdep.c + 720, 724, 727, 1208 lines etc .... ==> /sys/ufs/ufs/ufs_readwrite.c + 323, 350, 502 lines etc .... ==> etc .... ==> I think that b_dep is not NULL if buffer is being used in a filesystem. ==> So, b_dep is checked if the buffer is being used now. Right?? > > What does the code, 'b_dep!=NULL or b_dep==NULL', mean? 3. Which routine is called when buffer's data is written to the disk( due to 'bwrite' or write back )?? I have found bwrite(), bdwrite(), bawrite() etc..routines, but I don't know which routine does actually write buffer's data to disk. Does 'softdep_disk_write_complete()' routine in 'bio_ops bioops' structure write buffer's data to disk ?? ==> /sys/ufs/ffs/ffs_softdep.c + 207 lines .. (defined in 'bio_ops_bioops' structure) ==> /sys/ufs/ffs/ffs_softdep.c + 3176 lines .. (softdep_disk_write_complete() implementation) Thank you.. Again. Good Day. p.s.) You might see this page with HTML type. If so, I'm sorry. I don't know the way that this page is sent without HTML type. ...... ------_=_NextPart_001_01C0F5FA.7851A6A0 Content-Type: text/html; charset="euc-kr" Content-Transfer-Encoding: quoted-printable [=C0=FC=C3=BC=C8=B8=BD=C5] Re: 'b_dep' in buffer = structure....??

Thank you for being concerned about my = qeuestions.

the precise file + line number is as follows.
The version of FreeBSD is 4.3 Release.


>HI..
>
>I have some question about the meaning of buffer = flag, "b_dep" ...
>There is a comment in source code(buf.h) as = follows ...
>
>"List of filesystem dependencies" =

=3D=3D> /sys/sys/buf.h + 144 line (defined)

>
>1. In this comment, what does the 'filesystem = dependencies' mean?
>
>2. In the code about buffer operations, you can = see 'b_dep' flag marked NOT
>NULL or NULL. ( b_dep!=3DNULL or = b_dep=3D=3DNULL)..
>
> What does the code, 'b_dep!=3DNULL or = b_dep=3D=3DNULL', mean?


=3D=3D> /sys/kern/vfs_bio.c + 664, 733, 735, 1003, = 1637 lines etc....
=3D=3D> /sys/ufs/ffs/ffs_softdep.c + 720, 724, = 727, 1208 lines etc ....
=3D=3D> /sys/ufs/ufs/ufs_readwrite.c + 323, 350, = 502 lines etc ....
=3D=3D> etc ....

=3D=3D> I think that b_dep is not NULL if buffer = is being used in a filesystem.
=3D=3D> So, b_dep is checked if the buffer is = being used now. Right??

>
> What does the code, 'b_dep!=3DNULL or = b_dep=3D=3DNULL', mean?

3. Which routine is called when buffer's data is = written to the disk( due to 'bwrite' or write back )??
I have found bwrite(), bdwrite(), bawrite() = etc..routines, but I don't know which routine does actually write = buffer's data to disk.

Does 'softdep_disk_write_complete()' routine in = 'bio_ops bioops' structure write buffer's data to disk ??

=3D=3D> /sys/ufs/ffs/ffs_softdep.c + 207 lines .. = (defined in 'bio_ops_bioops' structure)
=3D=3D> /sys/ufs/ffs/ffs_softdep.c + 3176 lines = .. (softdep_disk_write_complete() implementation)


Thank you.. Again.
Good Day.

p.s.)
You might see this page with HTML type. If so, I'm = sorry.
I don't know the way that this page is sent without = HTML type.
......

------_=_NextPart_001_01C0F5FA.7851A6A0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message From owner-freebsd-fs Sat Jun 16 2:41:17 2001 Delivered-To: freebsd-fs@freebsd.org Received: from critter.freebsd.dk (fxp0.halvsten.ip.cybercity.dk [212.242.40.114]) by hub.freebsd.org (Postfix) with ESMTP id D731137B40B for ; Sat, 16 Jun 2001 02:41:14 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.3/8.11.3) with ESMTP id f5G2for83999; Sat, 16 Jun 2001 04:41:51 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: jdscol92@etri.re.kr Cc: freebsd-fs@FreeBSD.ORG Subject: Re: =?euc-kr?B?W8D8w7zIuL3FXSBSZTogJ2JfZGVwJyBpbiBidWZmZXIgc3RydWN0?= =?euc-kr?B?dXJlLi4uLj8/?= In-Reply-To: Your message of "Sat, 16 Jun 2001 09:22:47 +0900." <766FA1FC5C2AD511B3C800D0B7A8AC4A391289@cms3.etri.re.kr> Date: Sat, 16 Jun 2001 04:41:50 +0200 Message-ID: <83997.992659310@critter> From: Poul-Henning Kamp Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org In message <766FA1FC5C2AD511B3C800D0B7A8AC4A391289@cms3.etri.re.kr>, jdscol92@etri.re.kr writes: OK, now I understand your question better. >> What does the code, 'b_dep!=NULL or b_dep==NULL', mean? b_dep is used by softupdates to keep track of things which must be written before other things. Various places in the I/O system needs to fiddle with that in order to do the right thing. >3. Which routine is called when buffer's data is written to the disk( due >to 'bwrite' or write back )?? >I have found bwrite(), bdwrite(), bawrite() etc..routines, but I don't know >which routine does actually write buffer's data to disk. >Does 'softdep_disk_write_complete()' routine in 'bio_ops bioops' structure >write buffer's data to disk ?? Eventually, it all has to pass through the specfs_strategy() routine. The code paths through struct buf and assorted code are twisted indeed, and I am not able to give a brief explanation. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message