Date: Mon, 27 Apr 2009 10:58:43 -0400 (EDT) From: Rick Macklem <rmacklem@uoguelph.ca> To: "Rick C. Petty" <rick-freebsd2008@kiwi-computer.com> Cc: freebsd-fs@freebsd.org Subject: Re: Why do some ufs i-node fields have 2 copies? Message-ID: <Pine.GSO.4.63.0904271049160.17193@muncher.cs.uoguelph.ca> In-Reply-To: <20090427135200.GA59201@keira.kiwi-computer.com> References: <Pine.GSO.4.63.0904261651460.4478@muncher.cs.uoguelph.ca> <20090426210343.GA51829@keira.kiwi-computer.com> <Pine.GSO.4.63.0904261813260.16667@muncher.cs.uoguelph.ca> <20090427135200.GA59201@keira.kiwi-computer.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 27 Apr 2009, Rick C. Petty wrote: [good stuff snipped] >> If my interpretation of your answer is correct, I'd say that a "shadow >> copy" doesn't really add anything to the code? What do others think? > > It adds plenty-- you don't have to dereference more than the inode pointer. > If you don't use the shadows, you have to dereference the superblock (i_fs) > to get the UFS version as well as dereference the dinode itself. It > doesn't make sense to change all the macros to not use the shadows. > Oops, poorly expressed. What I meant to say was "doesn't really add anything to the line of code I listed in the original message": DIP_SET(ip, i_modrev, DIP(ip, i_modrev) + 1); since that is the only time i_modrev is manipulated. (I didn't mean "doesn't add anything to the code, in general".) If I were to add a "shadow copy" of i_modrev, the line would become: ip->i_modrev++; DIP_SET(ip, i_modrev, ip->i_modrev); and then ip->i_modrev = ip->i_din1->di_modrev; and ip->i_modrev = ip->i_din2->di_modrev; would have to be added to ffs_subr.c and an extra field added to the i-node structure for the "shadow copy". I don't think this would be an improvement compared to the one line. Does it make sense this time? Thanks, rick
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.63.0904271049160.17193>