Re: FS impl.

2005-05-06 Thread Stephan Uphoff
On Fri, 2005-05-06 at 16:01, Kip Macy wrote:
> On Fri, 6 May 2005, David Parfitt wrote:
> 
> > Hi -
> >   I have been trying to write my own UFS-like filesystem
> > implementation for fun. I had read somewhere that UFS was developed in
> > user space (correct me if I'm wrong on that one) and then moved over
> > to kernel-space. I was wondering if there are any existing facilities
> > in the kernel source tree that would allow me to develop an fs in user
> > space easily or with a little tweaking? As of right now, I have to
> > develop, compile, panic, reboot, debug etc. which is frustrating and
> > time consuming.
> 
> 
> I can't speak for user-space utilities, but using xen as a development 
> environment would dramatically shorten the panic and reboot cycle. In 
> addition, 
> you don't require a 2nd machine to debug with GDB. Just a thought. If booting 
> Linux makes you itch, NetBSD support for acting as the control plane is 
> supposed 
> to be stable.

I agree.

I used this approach with vmware a while ago and was more than happy.
>From what I see xen reboots are even faster (I only tried Xen with
NetBSD and linux so far). Hopefully Kip's work will make it into current
before I need a setup like this for FreeBSD.

An alternative would be a fast booting second machine with PXE (network)
booting. (real server hardware takes forever to boot - use consumer
boxes without ECC memory,SCSI, memory test,...)

Things have changed a bit since UFS was developed making development in
user space more difficult due to extra functionality that would need to
be ported/emulated to/in user space. 
There is also no pressure to do this since development in kernel space
is so much easier these days.

This being said I highly recommend writing user space test applications
that integrate modules/functions from your FS whenever possible.

Stephan



___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: FS impl.

2005-05-06 Thread Kurt J. Lidl
On Fri, May 06, 2005 at 02:01:35PM -0600, Warner Losh wrote:
> >   I have been trying to write my own UFS-like filesystem
> > implementation for fun. I had read somewhere that UFS was developed in
> > user space (correct me if I'm wrong on that one) and then moved over
> > to kernel-space. I was wondering if there are any existing facilities
> > in the kernel source tree that would allow me to develop an fs in user
> > space easily or with a little tweaking? As of right now, I have to
> > develop, compile, panic, reboot, debug etc. which is frustrating and
> > time consuming.
> 
> Maybe you are thinking of NFS :-).  You can use the same hooks that
> amd and similar programs to implement your code in userland.

It's pretty well known that Kirk did the 4.2 FFS implementation
as a user-mode process.  This statement is made directly in
Luke Mewburn's paper on cross-building NetBSD:

http://www.usenix.org/events/bsdcon03/tech/full_papers/mewburn/mewburn.pdf 
(page 9).

It doesn't say in the original 4.2 FFS paper.

-Kurt
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: FS impl.

2005-05-06 Thread Bakul Shah
>   I have been trying to write my own UFS-like filesystem
> implementation for fun. I had read somewhere that UFS was developed in
> user space (correct me if I'm wrong on that one) and then moved over
> to kernel-space. I was wondering if there are any existing facilities
> in the kernel source tree that would allow me to develop an fs in user
> space easily or with a little tweaking? As of right now, I have to
> develop, compile, panic, reboot, debug etc. which is frustrating and
> time consuming.

A stub FS that directs all vfs calls to userland would be a
handy thing  Similarly a stub disk --  one should be able
to debug support for Petabyte size disk without having to buy
one.

As for shortening the compile/debug/panic/reboot cycle, you
can use qemu.  Once a guest os is installed on a disk-image,
you can do this:

# qemu -s disk-image
# cd /usr/obj/usr/src/sys/
# gdb kernel.debug
(gdb) target remote localhost:1234

That is it!  No need to set up serial console or anything.

I haven't tried this but I guess this should work: If you
make the FS module a kernel module, and use qemu's snapshot
feature, after a crash you can reload from your image right
before FS module loading and go from there.

Now with a kernel module `kqemu', qemu runs approx twice as
slow as real h/w for usercode (as opposed to about 25 times
slower without kqemu).
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: FS impl.

2005-05-06 Thread Warner Losh
>   I have been trying to write my own UFS-like filesystem
> implementation for fun. I had read somewhere that UFS was developed in
> user space (correct me if I'm wrong on that one) and then moved over
> to kernel-space. I was wondering if there are any existing facilities
> in the kernel source tree that would allow me to develop an fs in user
> space easily or with a little tweaking? As of right now, I have to
> develop, compile, panic, reboot, debug etc. which is frustrating and
> time consuming.

Maybe you are thinking of NFS :-).  You can use the same hooks that
amd and similar programs to implement your code in userland.

Warner
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: FS impl.

2005-05-06 Thread Kip Macy


On Fri, 6 May 2005, David Parfitt wrote:

> Hi -
>   I have been trying to write my own UFS-like filesystem
> implementation for fun. I had read somewhere that UFS was developed in
> user space (correct me if I'm wrong on that one) and then moved over
> to kernel-space. I was wondering if there are any existing facilities
> in the kernel source tree that would allow me to develop an fs in user
> space easily or with a little tweaking? As of right now, I have to
> develop, compile, panic, reboot, debug etc. which is frustrating and
> time consuming.


I can't speak for user-space utilities, but using xen as a development 
environment would dramatically shorten the panic and reboot cycle. In addition, 
you don't require a 2nd machine to debug with GDB. Just a thought. If booting 
Linux makes you itch, NetBSD support for acting as the control plane is 
supposed 
to be stable.



-Kip
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


FS impl.

2005-05-06 Thread David Parfitt
Hi -
  I have been trying to write my own UFS-like filesystem
implementation for fun. I had read somewhere that UFS was developed in
user space (correct me if I'm wrong on that one) and then moved over
to kernel-space. I was wondering if there are any existing facilities
in the kernel source tree that would allow me to develop an fs in user
space easily or with a little tweaking? As of right now, I have to
develop, compile, panic, reboot, debug etc. which is frustrating and
time consuming.

Thanks -
David Parfitt
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


How many people do you need Oracle Instant Client8 on FreeBSD?

2005-05-06 Thread Norikatsu Shigemura
How many people do you need Oracle Instant Client a.k.a.
OCI8 on FreeBSD native applications?

I am tring to use FreeBSD native php5-oci8 with Linux
Plugin Wrapper (LPW) technorogy.  My attempt succeeded,
but it doesn't work.  Because there are many functions
to have to convert Linux ones to FreeBSD ones.  It is a
deadlock in me. 

And so, anyone do you try to implement these ones?

---
Step 1-5:

1. Get experimental LPW from following URL(use net/cvsync).
   cvsync://cvsync.ninth-nine.com/LinuxPluginWrapper/

2. Compile and install LPW and set /etc/libmap.conf.
   I confirmed on 6-current.  I don't know [45]-stable.

3. Install following ports.
   ports/databases/linux-oracle-instantclient-sdk
   ports/databases/linux-oracle-instantclient-basic

4. Install following 000.oci8.sh script to /usr/local/etc/rc.d/
---
#!/bin/sh

# PROVIDE: oci8
# REQUIRE: ldconfig
# KEYWORD: FreeBSD

. /etc/rc.subr

name=oci8

start_cmd=oci8_start
stop_cmd=:

[ -z "$oci8_libdir" ] && 
oci8_libdir="/compat/linux/usr/lib/oracle/10.1.0.3/client/lib"

oci8_start() {
if [ -d "$oci8_libdir" ]; then
/sbin/ldconfig -m "$oci8_libdir"
fi
}

load_rc_config $name
run_rc_command "$1"
---

5. Test, please follwoing port skelton.
---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#   php5-oci8/Makefile
#   php5-oci8/files/patch-config.m4
#
echo x - php5-oci8/Makefile
sed 's/^X//' >php5-oci8/Makefile << 'END-of-php5-oci8/Makefile'
X# New ports collection makefile for:   php5-oci8
X# Date created:2005-04-26
X# Whom:[EMAIL PROTECTED]
X#
X# $FreeBSD$
X#
X
XCATEGORIES=databases
X
XMASTERDIR= ${PORTSDIR}/lang/php5
X
XPKGNAMESUFFIX= -oci8
X
X.include "${MASTERDIR}/Makefile"
X
X.if ${PHP_MODNAME} == "oci8"
XOCI8_VER=  10.1.0.3
XBUILD_DEPENDS+= 
${LINUXBASE}/usr/include/oracle/${OCI8_VER}/client/oci.h:${PORTSDIR}/local/linux-oracle-instantclient-sdk
XRUN_DEPENDS+=  
${LINUXBASE}/usr/include/oracle/${OCI8_VER}/client/oci.h:${PORTSDIR}/local/linux-oracle-instantclient-sdk
X
XCONFIGURE_ARGS+=--with-oci8-instant-client=${LINUXBASE}/usr/lib/oracle/10.1.0.3/client/lib
X.endif
X
X
X
X#CONFIGURE_ENV+=   
LDFLAGS=-R${LINUXBASE}/usr/lib/oracle/10.1.0.3/client/lib /bin/sh -x
END-of-php5-oci8/Makefile
echo x - php5-oci8/files/patch-config.m4
sed 's/^X//' >php5-oci8/files/patch-config.m4 << 
'END-of-php5-oci8/files/patch-config.m4'
X--- config.m4.orig Fri Feb 25 20:32:01 2005
X+++ config.m4  Sun May  1 23:48:55 2005
X@@ -18,31 +18,6 @@
X   ])
X ])
X 
X-AC_DEFUN([AC_OCI8_VERSION],[
X-  AC_MSG_CHECKING([Oracle version])
X-  if test -s "$OCI8_DIR/orainst/unix.rgs"; then
X-OCI8_VERSION=`grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs | sed 's/[ ][ 
]*/:/g' | cut -d: -f 6 | cut -c 2-4`
X-test -z "$OCI8_VERSION" && OCI8_VERSION=7.3
X-  elif test -f $OCI8_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then
X-OCI8_VERSION=10.1
X-  elif test -f $OCI8_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.9.0; then
X-OCI8_VERSION=9.0
X-  elif test -f $OCI8_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.8.0; then
X-OCI8_VERSION=8.1
X-  elif test -f $OCI8_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.1.0; then
X-OCI8_VERSION=8.0
X-  elif test -f $OCI8_DIR/lib/libclntsh.a; then 
X-if test -f $OCI8_DIR/lib/libcore4.a; then 
X-  OCI8_VERSION=8.0
X-else
X-  OCI8_VERSION=8.1
X-fi
X-  else
X-AC_MSG_ERROR([Oracle (OCI8) required libraries not found])
X-  fi
X-  AC_MSG_RESULT($OCI8_VERSION)
X-])


X-
X AC_DEFUN([AC_OCI8IC_VERSION],[
X   AC_MSG_CHECKING([Oracle Instant Client version])
X   if test -f $PHP_OCI8_INSTANT_CLIENT/libociei.$SHLIB_SUFFIX_NAME; then
X@@ -60,149 +35,15 @@
X   AC_MSG_RESULT([$OCI8_VERSION])
X ])
X 
X-PHP_ARG_WITH(oci8, for Oracle (OCI8) support using ORACLE_HOME installation,
X-[  --with-oci8[=DIR]   Include Oracle (OCI8) support using an ORACLE_HOME
X-  install. The default DIR is ORACLE_HOME])
X-
X-if test "$PHP_OCI8" = "no"; then
X-  PHP_ARG_WITH(oci8-instant-client, for Oracle (OCI8) support using Oracle 
Instant Client,
X-  [  --with-oci8-instant-client[=DIR]
X-  Include Oracle (OCI8) support using
X-  Oracle 

Re: mergemaster improvement (auto-update for not modified files)

2005-05-06 Thread Daniel O'Connor
On Sat, 7 May 2005 00:15, Denis Peplin wrote:
> > Like I said before etcmerge's UI is not like mergemaster - it is much
> > more batch oriented.
>
> It is complicated for end-user to move from mergemaster to etcmerge
> (need to install new tool, read manual, perform some additional work...)

Maybe, I don't think it is that much effort.
The gain is much less work and many fewer questions each update so it's nice.

> > You don't need to download anything to start using etcmerge, you can just
> > use the files from your last mergemaster.
>
> For etcmerge it is need to run mergemaster "one last time", or use
> etc archive for some release.  So if mergemaster will be improved,
> it will be better for etcmerge :)

Well, you can use etcmerge if you haven't changed anything in /etc - ie on a 
fresh install.

Even if the checksum test is added to mergemaster it only covers one of the 
cases etcmerge handles, it still doesn't do a 3 way merge. The merge etcmerge 
does is very nice for removing changes to files you don't care about.

> > 264k is a pretty large file to commit to the repo..
>
> Yes, I know. And don't sure that it is some need to commit this file.
> Anyway, this file is less that INDEX, and unlike INDEX, will not
> rapidly changed. Checksum database will grow slowly.

The INDEX file isn't in CVS anymore..
It probably won't grow very fast, but IMO it seems like a bit of a kludge.
-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C


pgprkynpg2Np0.pgp
Description: PGP signature


Re: mergemaster improvement (auto-update for not modified files)

2005-05-06 Thread Denis Peplin
Hello!

Daniel O'Connor wrote:
> On Fri, 6 May 2005 23:18, Denis Peplin wrote:
> 
>>But for not modified files etcmerge is too complicated. Updating
>>for not modified files should be done in fully automated mode.
> 
> 
> hmm, but for unmodified files etcmerge does nothing - you don't have to do 
> anything unless you want to edit the new files so it IS automated.
> 
> Like I said before etcmerge's UI is not like mergemaster - it is much more 
> batch oriented.
It is complicated for end-user to move from mergemaster to etcmerge
(need to install new tool, read manual, perform some additional work...)

> 
> 
>>And for comparision, this file
>>http://people.freebsd.org/~den/scripts/mergemaster/sums-etc.list.gz
>>is only 264 kB in size. Unlike etcmerge archives (from link in etcmerge
>>manpage), it contain checksums, and checksums included for every
>>revision, even if it was not included in official release.
> 
> 
> You don't need to download anything to start using etcmerge, you can just use 
> the files from your last mergemaster.
For etcmerge it is need to run mergemaster "one last time", or use
etc archive for some release.  So if mergemaster will be improved,
it will be better for etcmerge :)

> 
> 
>>I think that checksums database can be even committed into
>>CVS and will not bloat it. Ideally, this way of updating should be
>>available even for those users who have no access to internet
>>(distribution recieved on CDROM, etc.)
> 
> 
> 264k is a pretty large file to commit to the repo..
> 
Yes, I know. And don't sure that it is some need to commit this file.
Anyway, this file is less that INDEX, and unlike INDEX, will not
rapidly changed. Checksum database will grow slowly.

P.S. I will be away till 10.05.
Bye!
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: mergemaster improvement (auto-update for not modified files)

2005-05-06 Thread Daniel O'Connor
On Fri, 6 May 2005 23:18, Denis Peplin wrote:
> But for not modified files etcmerge is too complicated. Updating
> for not modified files should be done in fully automated mode.

hmm, but for unmodified files etcmerge does nothing - you don't have to do 
anything unless you want to edit the new files so it IS automated.

Like I said before etcmerge's UI is not like mergemaster - it is much more 
batch oriented.

> And for comparision, this file
> http://people.freebsd.org/~den/scripts/mergemaster/sums-etc.list.gz
> is only 264 kB in size. Unlike etcmerge archives (from link in etcmerge
> manpage), it contain checksums, and checksums included for every
> revision, even if it was not included in official release.

You don't need to download anything to start using etcmerge, you can just use 
the files from your last mergemaster.

> I think that checksums database can be even committed into
> CVS and will not bloat it. Ideally, this way of updating should be
> available even for those users who have no access to internet
> (distribution recieved on CDROM, etc.)

264k is a pretty large file to commit to the repo..

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C


pgpvixNRyNSej.pgp
Description: PGP signature


Re: mergemaster improvement (auto-update for not modified files)

2005-05-06 Thread Denis Peplin
Hello!

Daniel O'Connor wrote:
> On Fri, 6 May 2005 20:18, Denis Peplin wrote:
> You know you can just use etcmerge to do this..
> It does a 3 way merge between your files and the old and new revisions.
> 
> The only down side is that it's UI is totally unlike mergemaster so it can be 
> a bit strange to get used to.

Thank for pointing me to this script, I will look into it for
ideas related to merging files that was modified.

But for not modified files etcmerge is too complicated. Updating
for not modified files should be done in fully automated mode.

And for comparision, this file
http://people.freebsd.org/~den/scripts/mergemaster/sums-etc.list.gz
is only 264 kB in size. Unlike etcmerge archives (from link in etcmerge
manpage), it contain checksums, and checksums included for every
revision, even if it was not included in official release.

I think that checksums database can be even committed into
CVS and will not bloat it. Ideally, this way of updating should be
available even for those users who have no access to internet
(distribution recieved on CDROM, etc.)
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: mergemaster improvement (auto-update for not modified files)

2005-05-06 Thread Daniel O'Connor
On Fri, 6 May 2005 20:18, Denis Peplin wrote:
> Hello!
>
> Julian Elischer wrote:
> > Mergemaster could keep checksums of known revisions.
> >
> > it wouldn't take much to have just one file with the last 35 checksums
> > of each file. (maybe with the $FreeBSD$ line removed if it differs..)
>
> Just implemented both variants (but second is not by count)
> 1. Full checksum story for every file (~ 650k).
> 2. Separated by date checksums (year 2000 was taken for example).
>
> New patch to mergemaster:
> http://people.freebsd.org/~den/scripts/mergemaster/mergemaster-checksum.dif
>f Script to collect checksums:
> http://people.freebsd.org/~den/scripts/mergemaster/etc_collect_checksums-sp
>litted.sh

You know you can just use etcmerge to do this..
It does a 3 way merge between your files and the old and new revisions.

The only down side is that it's UI is totally unlike mergemaster so it can be 
a bit strange to get used to.

-- 
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C


pgpf5DGuzUAiL.pgp
Description: PGP signature


Re: A bit confused with the sched_4bsd.c code

2005-05-06 Thread Divacky Roman
On Fri, May 06, 2005 at 09:39:21AM +0200, [EMAIL PROTECTED] wrote:
> 
> 
> >Halil Demirezen wrote:
> >> Hello,
> >> 
> >> First of all, I am not sure if this is the correct mail list with posting
> >this 
> >> mail. I apologize for that.. Second, I may seem to have little 
> >> C knowledge, though I am using C for about 5 years and plus.
> >> 
> >> Let's start with the question. I am digging the FreeBSD-5.3 kernel codes.
> >> Watson's Cross Reference is really helpful. In the schedcpu(void) function
> >> there is an assignment like "ke = td->td_kse;" on line 438  (see: 
> >> http://fxr.watson.org/fxr/source/kern/sched_4bsd.c?v=RELENG53#L438";).
> >> When I look at the thread structure at sys/proc.h, I could not see such
> >an
> >> entry td_kse in the "thread" structure. How has this structure been 
> >> extended
> >
> >> or this entry added to the thread structure?
> >> 
> >> Although the kernel codes seem to be simply understandable, there still
> >lies
> >> some difficulties to understand for an average C programmer: magic stuff
> >done
> >> by professionals. :)
> >> 
> >> Anyway, any help really will be appreciated...
> >> 
> >> Thanks.
> >
> >Look near the top of the file for:
> >
> >#define td_kse td_sched
> >
> >That makes td->td_kse resolve to td->td_sched.  Now, there is
> >other magic associated with td_sched in each scheduler source
> >file, but that's different matter =-)
> 
> If you *really* want to dig inside sources remind that grep is your friend

I'd go with cscsope (ports/devel/cscope) instead of grep... ;)
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: mergemaster improvement (auto-update for not modified files)

2005-05-06 Thread Denis Peplin
Hello!

Juergen Unger wrote:
> On Tue, May 03, 2005 at 11:15:51AM -0700, Julian Elischer wrote:
>>files that I have not touched are at default state and I wnat them to move 
>>to teh new default state. Files I have touched, I want to look at by hand.
> 
> 
> so do I.  And to go a step further: why do we at all have to run
> this things in single-user mode ?
> Not that I am not aware of the technical reasons for it
> BUT: why don't we run both the installworld and the mergemaster
> jobs in a manner where they only _preparing_ the installation of
> the update ? ... maybe creating a jobfile which could be
> run automatically during reboot to make the update instantaneous
> happen without a long downtime to do it all manually in
> single-user mode over a slow serial console ?

Ideas like this are definitely flying around.
In addition I can say that it will be good to recieve control
back even if something goes wrong on such auto-update.
Maybe statically-linked sshd in root directory would help in such
(and many other) situations.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: mergemaster improvement (auto-update for not modified files)

2005-05-06 Thread Denis Peplin
Hello!

Julian Elischer wrote:
> Mergemaster could keep checksums of known revisions.
> 
> it wouldn't take much to have just one file with the last 35 checksums
> of each file. (maybe with the $FreeBSD$ line removed if it differs..)

Just implemented both variants (but second is not by count)
1. Full checksum story for every file (~ 650k).
2. Separated by date checksums (year 2000 was taken for example).

New patch to mergemaster:
http://people.freebsd.org/~den/scripts/mergemaster/mergemaster-checksum.diff
Script to collect checksums:
http://people.freebsd.org/~den/scripts/mergemaster/etc_collect_checksums-splitted.sh

This script takes few hours to complete, but checksums list
available too.

Checksums, other links, TODO and full story here:
http://people.freebsd.org/~den/scripts/mergemaster/
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: files refused to delete

2005-05-06 Thread Maslan
here is the output of fsck :

** /dev/ad0s3a (NO WRITE)
** Last Mounted on /
** Root file system
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2671 files, 44960 used, 1937879 free (703 frags, 242147 blocks, 0.0%
fragmentation)
** /dev/ad0s3e (NO WRITE)
** Last Mounted on /usr
** Phase 1 - Check Blocks and Sizes
INCORRECT BLOCK COUNT I=196742 (4 should be 0)
CORRECT? no

** Phase 2 - Check Pathnames
MISSING '.'  I=197304  OWNER=maslan MODE=40755
SIZE=512 MTIME=May  5 17:30 2005 
DIR=?

UNEXPECTED SOFT UPDATE INCONSISTENCY
CANNOT FIX, FIRST ENTRY IN DIRECTORY CONTAINS koko

UNEXPECTED SOFT UPDATE INCONSISTENCY
MISSING '..'  I=197304  OWNER=maslan MODE=40755
SIZE=512 MTIME=May  5 17:30 2005 
DIR=/home/maslan/.Trash/XY/Final/$YREX~1/trrt

UNEXPECTED SOFT UPDATE INCONSISTENCY
CANNOT FIX, SECOND ENTRY IN DIRECTORY CONTAINS f

UNEXPECTED SOFT UPDATE INCONSISTENCY
?/fd IS AN EXTRANEOUS HARD LINK TO DIRECTORY /lost+found/#197140

REMOVE? no

BAD INODE NUMBER FOR '..'  I=197140  OWNER=maslan MODE=40755
SIZE=512 MTIME=Apr 11 17:32 2005 
DIR=?/fd

UNEXPECTED SOFT UPDATE INCONSISTENCY

FIX? no

** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
FREE BLK COUNT(S) WRONG IN SUPERBLK
SALVAGE? no

SUMMARY INFORMATION BAD
SALVAGE? no

BLK(S) MISSING IN BIT MAPS
SALVAGE? no

223330 files, 1470245 used, 553153 free (21905 frags, 66406 blocks,
1.1% fragmentation)
** /dev/ad0s3d (NO WRITE)
** Last Mounted on /var
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2271 files, 8379 used, 485820 free (2028 frags, 60474 blocks, 0.4%
fragmentation)



On 5/4/05, Julian Elischer <[EMAIL PROTECTED]> wrote:
> use ls -lo to see if there are any special flags set on the file.
> man chflags for more information on the flags.
> 
> How did you delete if from linux? last I heard the linux ufs code was
> not very healthy.
> maybe they fixed it..
> 
> 
> Maslan wrote:
> 
> >when i've extract a bz2 file containing filenames in other encodings 
> >(arabic),
> >the file names appears ??? and it refuses to delete , however i
> >deleted them from linux
> >but the fsck created a hard link to them in lost+found and this hard
> >links refused to deleted, it also created a hard link to my home
> >directory which also refused to delete.
> >is this bug in bfs or in fsck ???
> >
> >
> >
> 


-- 
I'm Searching For Perfection,
So Even If U Need Portability U've To Use Assembly ;-)
http://www.maslanlab.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: A bit confused with the sched_4bsd.c code

2005-05-06 Thread gerarra


>Halil Demirezen wrote:
>> Hello,
>>
>> First of all, I am not sure if this is the correct mail list with posting
>this
>> mail. I apologize for that.. Second, I may seem to have little
>> C knowledge, though I am using C for about 5 years and plus.
>>
>> Let's start with the question. I am digging the FreeBSD-5.3 kernel codes.
>> Watson's Cross Reference is really helpful. In the schedcpu(void) function
>> there is an assignment like "ke = td->td_kse;" on line 438  (see:
>> http://fxr.watson.org/fxr/source/kern/sched_4bsd.c?v=RELENG53#L438";).
>> When I look at the thread structure at sys/proc.h, I could not see such
>an
>> entry td_kse in the "thread" structure. How has this structure been extended
>
>> or this entry added to the thread structure?
>>
>> Although the kernel codes seem to be simply understandable, there still
>lies
>> some difficulties to understand for an average C programmer: magic stuff
>done
>> by professionals. :)
>>
>> Anyway, any help really will be appreciated...
>>
>> Thanks.
>
>Look near the top of the file for:
>
>#define td_kse td_sched
>
>That makes td->td_kse resolve to td->td_sched.  Now, there is
>other magic associated with td_sched in each scheduler source
>file, but that's different matter =-)

If you *really* want to dig inside sources remind that grep is your friend

rookie


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"