You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(69) |
Nov
(23) |
Dec
(85) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(173) |
Feb
(316) |
Mar
(496) |
Apr
(528) |
May
(264) |
Jun
(761) |
Jul
(705) |
Aug
(632) |
Sep
(704) |
Oct
(685) |
Nov
(934) |
Dec
(1132) |
2003 |
Jan
(896) |
Feb
(1138) |
Mar
(866) |
Apr
(1119) |
May
(1604) |
Jun
(869) |
Jul
(674) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
From: Jacob B. <ja...@cl...> - 2003-10-03 05:32:43
|
Hello Lustre mailing list members, The Lustre mailing lists have moved! Although this process began around two months ago, the old SourceForge lists are finally being turned off on October 15, 2003. If you were subscribed as a non-digest member before July 14, 2003, you probably do not need to do anything, as those list members were subscribed to the new lists. However, if you subscribed to the SourceForge lists since then, or were a digest member, you may need to subscribe to the new lists. This mail has been sent to both the old (SourceForge) and new list, so if you recieve two copies you do not need to do anything. You can subscribe to the new mailing list here: https://lists.clusterfs.com/mailman/listinfo/lustre-cvs If you have any questions or problems, please send mail to sy...@cl.... Thanks, - jacob |
From: Robert R. <rr...@cl...> - 2003-09-05 23:11:40
|
* Andreas Dilger (ad...@cl...) [030905 11:11]: > > Actually, that's what the "NIDTYPE=localhost" option does. The hostname > will be localhost for all of the nodes. Ok, that's pretty bizarre. :) The code in the in the recovery ltest is a bit more general, and allows the facets to be on different nodes, but the tests still refer the facet names to start and stop services. robert |
From: Andreas D. <ad...@us...> - 2003-07-24 18:11:31
|
Update of /cvsroot/lustre/ltest/auto-test In directory sc8-pr-cvs1:/tmp/cvs-serv26679/auto-test Modified Files: config.example Log Message: Fix typos. Index: config.example =================================================================== RCS file: /cvsroot/lustre/ltest/auto-test/config.example,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -b -B -p -r1.3 -r1.4 --- config.example 22 May 2003 15:29:58 -0000 1.3 +++ config.example 24 Jul 2003 18:11:29 -0000 1.4 @@ -11,8 +11,8 @@ MACHINENAME=`hostname | sed -e 's/[0-9]\ # TAGLIST is a list of CVS tags to test against. Different tags # for Lustre and Portals can be used by colon seperating the tag names. -# For instanst, if one entry is "b_md", auto-test will try to check out -# both Luster and Portals with the tag "b_md", but if the field is +# For instance, if one entry is "b_md", auto-test will try to check out +# both Lustre and Portals with the tag "b_md", but if the field is # "b_md:HEAD", the "b_md" tag of Lustre will be checked out, and the "HEAD" # tag of Portals will be checked out. TAGLIST="b_md:HEAD" |
From: Andreas D. <ad...@us...> - 2003-07-24 18:11:31
|
Update of /cvsroot/lustre/ltest/acceptance/io In directory sc8-pr-cvs1:/tmp/cvs-serv26679/acceptance/io Modified Files: runcreate.sh Log Message: Fix typos. Index: runcreate.sh =================================================================== RCS file: /cvsroot/lustre/ltest/acceptance/io/runcreate.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -b -B -p -r1.5 -r1.6 --- runcreate.sh 7 Feb 2003 18:27:19 -0000 1.5 +++ runcreate.sh 24 Jul 2003 18:11:29 -0000 1.6 @@ -33,7 +33,7 @@ LTESTDIR="`dirname $0`/.." if [ -f $LTESTDIR/common/config-tests.sh ]; then . $LTESTDIR/common/config-tests.sh else - echo "Couldnt find $LTESTDIR/common/config-tests.sh." + echo "Couldn't find $LTESTDIR/common/config-tests.sh." fi start_test "runcreate" |
From: Hariharan T. <th...@us...> - 2003-07-15 00:14:11
|
Update of /cvsroot/lustre/lustre/utils In directory sc8-pr-cvs1:/tmp/cvs-serv1508 Modified Files: Tag: b_devel llascii.pm llcommon.pm llconsts.pm llgtk.pm Log Message: Updated for including system call marker boundaries. These also show up in the summary view, useful for relating context to a lustre lite file operation Index: llascii.pm =================================================================== RCS file: /cvsroot/lustre/lustre/utils/llascii.pm,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -w -b -B -p -r1.1.2.6 -r1.1.2.7 --- llascii.pm 9 Jul 2003 19:12:17 -0000 1.1.2.6 +++ llascii.pm 15 Jul 2003 00:14:08 -0000 1.1.2.7 @@ -91,7 +91,7 @@ sub HTML_leftpane } # 1000 microseconds is each table element -$timebase = 1000; +$timebase = 10000; Index: llcommon.pm =================================================================== RCS file: /cvsroot/lustre/lustre/utils/llcommon.pm,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -w -b -B -p -r1.1.2.7 -r1.1.2.8 --- llcommon.pm 9 Jul 2003 19:12:17 -0000 1.1.2.7 +++ llcommon.pm 15 Jul 2003 00:14:08 -0000 1.1.2.8 @@ -29,8 +29,8 @@ use llconsts; # Regular expressions below # Constants below - -my $VFS_STACK_VAL = 1; +my $SYS_CALL_STACK_VAL = 1; +my $VFS_STACK_VAL = 2; my $EMPTY = "EMPTY"; my $HANDLING = "Handling"; my $HANDLED = "Handled"; @@ -46,7 +46,7 @@ $LDLM_FIELDS = qr/ns: ([-\w]+) lock: ([a $PROCESS_MARKER = qr/Process (entered)|(leaving)/; $RPCREGEX = qr/($SENDING|$HANDLING|$HANDLED|$COMPLETED)\sRPC\spname:cluuid:pid:xid:ni:nid:opc\s([-\.\w\d]+)(?:\|[\d]+)?:([-\.\w\d]+):(\d+):(?:0x)?(\w+):(?:\w+):(?:0x)?(\w+):(\d+)/; $VFS_REGEX = qr/VFS Op:(.+)/; -$MARKER_REGEX = qr/DEBUG MARKER:\s*====([\d+])=(.*)/; +$SYS_CALL_REGEX = qr/DEBUG MARKER:\s*====([\d]+)=(.*)/; $LDLM_REGEX = qr/^\s*###/; $REINT_REGEX = qr/^\s@@@ reint [\d]+ \(([\w]+)\)/; @@ -109,19 +109,21 @@ sub parse_file # Insert beginning of file marker, an all zero pattern my $fileline = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ,0 ,0, 0, 0]; my $new_file = join('_', split(/[\/, \.]/, $file)); + $fileline->[$e_filename] = $file; $fileline->[$e_fmtstr] = $new_file; $fileline->[$e_rpcref] = 0; + $fileline->[$e_time] = 0; my $start = times(); push @{$array_parsed->[$numfiles]}, $fileline; while(<FILEHANDLE>) { $linecnt++; - my @parsed_line = get_parsed_line($file, $linecnt, $_, $sline); + my @parsed_line = get_parsed_line($file, $linecnt, $_, $sline, $marker_ref); next if ($#parsed_line == 0); last if ($eline && ($linecnt > $eline)); next if (ignore_conditions(\@parsed_line, $pid, $nodlm, $noclass, $nonet)); - if (!exists($gblstarttime{$new_file})) { - $gblstarttime{$new_file} = $parsed_line[$e_time]; + if (!exists($gblstarttime{$fileline->[$e_filename]})) { + $gblstarttime{$fileline->[$e_filename]} = $parsed_line[$e_time]; } $curridx++; if ($prev_time > $parsed_line[$e_time]) { @@ -134,7 +136,7 @@ sub parse_file if ($start_idx->[$numfiles] == 0) { print STDERR "Wrapped log at $linecnt in file $file\n"; $start_idx->[$numfiles] = $curridx; # Accounting for the dummy file line - $gblstarttime{$new_file} = $parsed_line[$e_time]; + $gblstarttime{$fileline->[$e_filename]} = $parsed_line[$e_time]; # Invalidate all the pid marker lines for this file, until now @pids_file = split(/,/, $fileline->[$e_pid]); foreach $pid (@pids_file) { @@ -217,9 +219,9 @@ sub parse_file my $arrayindex = 0; while ($arrayindex <= $#$array_parsed) { my $fileline = $array_parsed->[$arrayindex]->[0]; - my $file_start = $gblstarttime{$fileline->[$e_fmtstr]}; + my $file_start = $gblstarttime{$fileline->[$e_filename]}; $fileline->[$e_tmoff] = $file_start-$base_time; - print STDERR "File: $fileline->[$e_fmtstr]" , + print STDERR "File: $fileline->[$e_filename] " , "Offset: $fileline->[$e_tmoff]\n"; $arrayindex ++; } @@ -234,7 +236,7 @@ sub get_parsed_line() my $linecnt = shift; my $in_line = shift; my $sline = shift; - + my $marker_ref = shift; if (($sline) && ($linecnt < $sline)) { return 0; @@ -244,6 +246,17 @@ sub get_parsed_line() my $display_str = "${5}:${6}"; @parsed_line = ($1, $2, $4, $display_str, $7, $tagged_pid, $9, $10, 0, 0, 0, 0, 0, 0, 0, 0); + if ($in_line =~ $SYS_CALL_REGEX) { + if ($1 == 0) { + #print STDERR "Skipping marker line $parsed_line[$e_fmtstr]\n"; + return 0; + } + $parsed_line[$e_function] = $2; + $parsed_line[$e_pid] = "${1}:${file}"; + $parsed_line[$e_fmtstr] = "$2"; + $parsed_line[$e_stack] = $SYS_CALL_STACK_VAL; + $marker_ref->{$parsed_line[$e_time]} = [$parsed_line[$e_pid], $parsed_line[$e_fmtstr]]; + } $parsed_line[$e_rpcref] = 0; } else { chop $in_line; @@ -495,6 +508,8 @@ sub process_array my $arrayref = $newarrayref->[$filearrayidx]; my $arrayindex = 0; my $start = times(); + my $fileline = $arrayref->[0]; + print STDERR "FILELINE: $fileline->[$e_filename]\n"; while ($arrayindex <= $#$arrayref) { my $actualidx = ($arrayindex+($start_idx->[$filearrayidx]))%($#$arrayref+1); my $lineref = $arrayref->[$actualidx]; @@ -511,13 +526,10 @@ sub process_array $pidprevious->[$e_next] = $lineref; } # Match VFS lines & force VFS Stack Value to be 1 (markers are 0) + if ($lineref->[$e_fmtstr] =~ $VFS_REGEX) { $vfs_ref->{$lineref->[$e_time]} = $lineref; $lineref->[$e_stack] = $VFS_STACK_VAL; - } - # Match Markers - elsif ($lineref->[$e_fmtstr] =~ $MARKER_REGEX) { - $marker_ref->{$lineref->[$e_time]} = [$1, $2, $lineref]; } elsif ($lineref->[$e_fmtstr] =~ $REINT_REGEX) { my $rpcline = $lastrpcbypid{$lineref->[$e_pid]}; if ($rpcline->[$e_rpcopc] != 36) { @@ -525,8 +537,7 @@ sub process_array } $rpcline->[$e_rpcreint] = $1; delete $lastrpcbypid{$lineref->[$e_pid]}; - } - else { + } else { if (($lineref->[$e_fmtstr] =~ qr/($SENDING|$HANDLING|$HANDLED|$COMPLETED)/) || (($lineref->[$e_fmtstr] =~ $LDLM_REGEX)) ) { @@ -540,8 +551,7 @@ sub process_array } my $end = times(); my $tottime = $end-$start; - my $fileline = $arrayref->[0]->[$e_fmtstr]; - print STDERR "Processed $fileline, time: $tottime\n"; + print STDERR "Processed $fileline->[$e_filename], time: $tottime\n"; $filearrayidx++; } Index: llconsts.pm =================================================================== RCS file: /cvsroot/lustre/lustre/utils/llconsts.pm,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -w -b -B -p -r1.1.2.4 -r1.1.2.5 --- llconsts.pm 9 Jul 2003 18:09:14 -0000 1.1.2.4 +++ llconsts.pm 15 Jul 2003 00:14:08 -0000 1.1.2.5 @@ -25,7 +25,7 @@ package llconsts; require Exporter; @ISA = qw(Exporter); -@EXPORT = qw(%ll_opcodes %ll_reint_opcodes %ll_subsystems %subsysnum %trace_masks %gblstarttime $e_subsys $e_mask $e_time $e_displaystr $e_function $e_pid $e_stack $e_fmtstr $e_treenode $e_numchildren $e_youngestchild $e_pidhead $e_next $e_backref $e_marked $e_rpcref $e_rpcuuid $e_rpcxid $e_rpcopc $e_rpcreint $e_rpcsndrcv $e_rpcpid $e_rpcnid $e_cliRPCent $e_srvRPCent $e_srvRPCexit $e_cliRPCexit $e_clirpctime $e_srvrpctime $e_rpckey $e_ltype $e_reqres $e_grantedres $e_reqmode $e_grantmode $e_lineref $e_pidcmd $e_tmoff $INVALID); +@EXPORT = qw(%ll_opcodes %ll_reint_opcodes %ll_subsystems %subsysnum %trace_masks %gblstarttime $e_subsys $e_mask $e_time $e_displaystr $e_function $e_pid $e_stack $e_fmtstr $e_treenode $e_numchildren $e_youngestchild $e_pidhead $e_next $e_backref $e_marked $e_rpcref $e_rpcuuid $e_rpcxid $e_rpcopc $e_rpcreint $e_rpcsndrcv $e_rpcpid $e_rpcnid $e_cliRPCent $e_srvRPCent $e_srvRPCexit $e_cliRPCexit $e_clirpctime $e_srvrpctime $e_rpckey $e_ltype $e_reqres $e_grantedres $e_reqmode $e_grantmode $e_lineref $e_pidcmd $e_tmoff $e_filename $INVALID); ($e_subsys, @@ -67,7 +67,7 @@ require Exporter; ($e_lineref, $e_pidcmd) = (0, 1); # Some timing related constants -$e_tmoff = 0; +($e_tmoff, $e_filename) = (0, 1); our %ll_opcodes = ("0" => "OST_REPLY", "1" => "OST_GETATTR", "2" => "OST_SETATTR", "3" => "OST_READ", "4" => "OST_WRITE", Index: llgtk.pm =================================================================== RCS file: /cvsroot/lustre/lustre/utils/llgtk.pm,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -u -w -b -B -p -r1.1.2.6 -r1.1.2.7 --- llgtk.pm 11 Jul 2003 18:00:14 -0000 1.1.2.6 +++ llgtk.pm 15 Jul 2003 00:14:08 -0000 1.1.2.7 @@ -330,6 +330,7 @@ sub get_display_params { my $lineref = shift; my $subsysname; + #print STDERR "LINE: $lineref->[$e_fmtstr], $lineref->[$e_subsys]\n"; if (exists $ll_subsystems{$lineref->[$e_subsys]}) { $subsysname = $ll_subsystems{$lineref->[$e_subsys]}; } else { |
From: Peter J. B. <br...@us...> - 2003-07-13 23:15:09
|
Update of /cvsroot/lustre/lustre/llite In directory sc8-pr-cvs1:/tmp/cvs-serv6774/llite Modified Files: Tag: b_unify dcache.c file.c llite_internal.h llite_lib.c namei.c Log Message: - introduce lustre_md and generic method in mdc to pull it out of a request - swab all reint requests in a consistent way Index: dcache.c =================================================================== RCS file: /cvsroot/lustre/lustre/llite/dcache.c,v retrieving revision 1.34.6.14.2.5 retrieving revision 1.34.6.14.2.6 diff -u -w -b -B -p -r1.34.6.14.2.5 -r1.34.6.14.2.6 --- dcache.c 13 Jul 2003 00:32:10 -0000 1.34.6.14.2.5 +++ dcache.c 13 Jul 2003 23:15:04 -0000 1.34.6.14.2.6 @@ -89,10 +89,7 @@ static int revalidate_it_finish(struct p struct lookup_intent *it, int offset, obd_id ino) { struct ll_sb_info *sbi = ll_i2sbi(parent); - struct mds_body *body; - struct lov_stripe_md *lsm = NULL; - struct lov_mds_md *lmm; - int lmmsize; + struct lustre_md md; int rc = 0; ENTRY; @@ -100,50 +97,20 @@ static int revalidate_it_finish(struct p * when I return */ if (it_disposition(it, DISP_LOOKUP_NEG)) - GOTO (out, rc = -ENOENT); + RETURN(-ENOENT); - /* We only get called if the mdc_enqueue() called from - * ll_intent_lock() was successful. Therefore the mds_body is - * present and correct, and the eadata is present (but still - * opaque, so only obd_unpackmd() can check the size) */ - body = lustre_msg_buf(request->rq_repmsg, offset, sizeof (*body)); - LASSERT (body != NULL); - LASSERT_REPSWABBED (request, offset); - - if (body->valid & OBD_MD_FLEASIZE) { - /* Only bother with this if inodes's LSM not set? */ - - if (body->eadatasize == 0) { - CERROR ("OBD_MD_FLEASIZE set, but eadatasize 0\n"); - GOTO (out, rc = -EPROTO); - } - lmmsize = body->eadatasize; - lmm = lustre_msg_buf (request->rq_repmsg, offset + 1, lmmsize); - LASSERT (lmm != NULL); - LASSERT_REPSWABBED (request, offset + 1); - - rc = obd_unpackmd (&sbi->ll_osc_conn, - &lsm, lmm, lmmsize); - if (rc < 0) { - CERROR ("Error %d unpacking eadata\n", rc); - LBUG(); - /* XXX don't know if I should do this... */ - GOTO (out, rc); - /* or skip the ll_update_inode but still do - * mdc_lock_set_inode() */ - } - LASSERT (rc >= sizeof (*lsm)); - rc = 0; - } + /* ll_intent_lock was successful, now prepare the lustre_md) */ + rc = mdc_req2lustre_md(request, offset, &sbi->ll_osc_conn, &md); + if (rc) + RETURN(rc); - ll_update_inode((*de)->d_inode, body, lsm); + ll_update_inode((*de)->d_inode, md.body, md.lsm); - if (lsm != NULL && ll_i2info((*de)->d_inode)->lli_smd != lsm) - obd_free_memmd (&sbi->ll_osc_conn, &lsm); + if (md.lsm != NULL && ll_i2info((*de)->d_inode)->lli_smd != md.lsm) + obd_free_memmd (&sbi->ll_osc_conn, &md.lsm); ll_mdc_lock_set_inode((struct lustre_handle *)it->it_lock_handle, (*de)->d_inode); - out: RETURN(rc); } Index: file.c =================================================================== RCS file: /cvsroot/lustre/lustre/llite/file.c,v retrieving revision 1.110.2.55.2.6 retrieving revision 1.110.2.55.2.7 diff -u -w -b -B -p -r1.110.2.55.2.6 -r1.110.2.55.2.7 --- file.c 13 Jul 2003 00:32:10 -0000 1.110.2.55.2.6 +++ file.c 13 Jul 2003 23:15:04 -0000 1.110.2.55.2.7 @@ -1146,60 +1146,39 @@ int ll_inode_revalidate_it(struct dentry that lock*/ if (!(it && it->it_lock_mode) && !ll_have_md_lock(dentry)) { + struct lustre_md md; struct ptlrpc_request *req = NULL; struct ll_sb_info *sbi = ll_i2sbi(dentry->d_inode); struct ll_fid fid; - struct mds_body *body; - struct lov_mds_md *lmm; unsigned long valid = 0; - int eadatalen = 0, rc; + int rc; + int ealen = 0; if (S_ISREG(inode->i_mode)) { - eadatalen = obd_size_diskmd(&sbi->ll_osc_conn, NULL); + ealen = obd_size_diskmd(&sbi->ll_osc_conn, NULL); valid |= OBD_MD_FLEASIZE; } ll_inode2fid(&fid, inode); - rc = mdc_getattr(&sbi->ll_mdc_conn, &fid, - valid, eadatalen, &req); + rc = mdc_getattr(&sbi->ll_mdc_conn, &fid, valid, ealen, &req); if (rc) { CERROR("failure %d inode %lu\n", rc, inode->i_ino); RETURN(-abs(rc)); } - - body = lustre_msg_buf(req->rq_repmsg, 0, sizeof (*body)); - LASSERT (body != NULL); /* checked by mdc_getattr() */ - LASSERT_REPSWABBED (req, 0); /* swabbed by mdc_getattr() */ - + mdc_req2lustre_md(req, 0, &sbi->ll_osc_conn, &md); /* XXX Too paranoid? */ - if ((body->valid ^ valid) & OBD_MD_FLEASIZE) + if ((md.body->valid ^ valid) & OBD_MD_FLEASIZE) CERROR("Asked for %s eadata but got %s\n", (valid & OBD_MD_FLEASIZE) ? "some" : "no", - (body->valid & OBD_MD_FLEASIZE) ? "some":"none"); - - if (S_ISREG(inode->i_mode) && (body->valid & OBD_MD_FLEASIZE)) { - if (body->eadatasize == 0) { /* no EA data */ - CERROR("OBD_MD_FLEASIZE set but no data\n"); - RETURN(-EPROTO); - } - /* Only bother with this if inode's lsm not set? */ - lmm = lustre_msg_buf(req->rq_repmsg,1,body->eadatasize); - LASSERT(lmm != NULL); /* mdc_getattr() checked */ - LASSERT_REPSWABBED(req, 1); /* mdc_getattr() swabbed */ - - rc = obd_unpackmd(&sbi->ll_osc_conn, - &lsm, lmm, body->eadatasize); - if (rc < 0) { - CERROR("Error %d unpacking eadata\n", rc); + (md.body->valid & OBD_MD_FLEASIZE) ? "some":"none"); + if (rc) { ptlrpc_req_finished(req); RETURN(rc); } - LASSERT(rc >= sizeof(*lsm)); - } - ll_update_inode(inode, body, lsm); - if (lsm != NULL && ll_i2info(inode)->lli_smd != lsm) - obd_free_memmd(&sbi->ll_osc_conn, &lsm); + ll_update_inode(inode, md.body, md.lsm); + if (lsm != NULL && ll_i2info(inode)->lli_smd != md.lsm) + obd_free_memmd(&sbi->ll_osc_conn, &md.lsm); ptlrpc_req_finished(req); } Index: llite_internal.h =================================================================== RCS file: /cvsroot/lustre/lustre/llite/llite_internal.h,v retrieving revision 1.1.2.4.2.7 retrieving revision 1.1.2.4.2.8 diff -u -w -b -B -p -r1.1.2.4.2.7 -r1.1.2.4.2.8 --- llite_internal.h 13 Jul 2003 00:32:10 -0000 1.1.2.4.2.7 +++ llite_internal.h 13 Jul 2003 23:15:04 -0000 1.1.2.4.2.8 @@ -18,12 +18,6 @@ struct lov_stripe_md; extern void lprocfs_unregister_mountpoint(struct ll_sb_info *sbi); extern struct proc_dir_entry *proc_lustre_fs_root; -struct ll_read_inode2_cookie { - struct mds_body *lic_body; - struct lov_stripe_md *lic_lsm; -}; - - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) # define hlist_del_init list_del_init #endif @@ -48,7 +42,7 @@ void lprocfs_unregister_mountpoint(struc /* llite/namei.c */ struct inode *ll_iget(struct super_block *sb, ino_t hash, - struct ll_read_inode2_cookie *lic); + struct lustre_md *lic); struct dentry *ll_find_alias(struct inode *, struct dentry *); int ll_it_open_error(int phase, struct lookup_intent *it); int ll_mdc_cancel_unused(struct lustre_handle *conn, struct inode *inode, Index: llite_lib.c =================================================================== RCS file: /cvsroot/lustre/lustre/llite/Attic/llite_lib.c,v retrieving revision 1.1.6.6 retrieving revision 1.1.6.7 diff -u -w -b -B -p -r1.1.6.6 -r1.1.6.7 --- llite_lib.c 13 Jul 2003 00:32:10 -0000 1.1.6.6 +++ llite_lib.c 13 Jul 2003 23:15:04 -0000 1.1.6.7 @@ -140,7 +140,7 @@ int ll_fill_super(struct super_block *sb struct obd_statfs osfs; struct ptlrpc_request *request = NULL; struct ptlrpc_connection *mdc_conn; - struct ll_read_inode2_cookie lic; + struct lustre_md md; class_uuid_t uuid; ENTRY; @@ -244,18 +244,18 @@ int ll_fill_super(struct super_block *sb GOTO(out_lliod, err); } - lic.lic_body = lustre_msg_buf(request->rq_repmsg, 0, - sizeof(*lic.lic_body)); - LASSERT (lic.lic_body != NULL); /* checked by mdc_getattr() */ - LASSERT_REPSWABBED (request, 0); /* swabbed by mdc_getattr() */ - - lic.lic_lsm = NULL; + err = mdc_req2lustre_md(request, 0, &sbi->ll_osc_conn, &md); + if (err) { + CERROR("failed to understand root inode md: rc = %d\n",err); + ptlrpc_req_finished (request); + GOTO(out_lliod, err); + } LASSERT(sbi->ll_rootino != 0); #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - root = iget4(sb, sbi->ll_rootino, NULL, &lic); + root = iget4(sb, sbi->ll_rootino, NULL, &md); #else - root = ll_iget(sb, sbi->ll_rootino, &lic); + root = ll_iget(sb, sbi->ll_rootino, &md); #endif ptlrpc_req_finished(request); @@ -605,24 +605,29 @@ int ll_setattr_raw(struct inode *inode, * In that case, we need to check permissions and update the local * inode ourselves so we can call obdo_from_inode() always. */ if (ia_valid & (lsm ? ~(OST_ATTR | ATTR_FROM_OPEN | ATTR_RAW) : ~0)) { - struct mds_body *body; - + struct lustre_md md; ll_prepare_mdc_op_data(&op_data, inode, NULL, NULL, 0, 0); rc = mdc_setattr(&sbi->ll_mdc_conn, &op_data, attr, NULL, 0, NULL, 0, &request); - if (rc && rc != -EPERM) { + if (rc) { ptlrpc_req_finished(request); + if (rc != -EPERM) CERROR("mdc_setattr fails: err = %d\n", rc); RETURN(rc); } - body = lustre_msg_buf(request->rq_repmsg, 0, sizeof(*body)); - ll_update_inode(inode, body, NULL); + rc = mdc_req2lustre_md(request, 0, &sbi->ll_osc_conn, &md); + if (rc && rc != -EPERM) { + ptlrpc_req_finished(request); + CERROR("mdc_setattr fails: err = %d\n", rc); + RETURN(rc); + } + ll_update_inode(inode, md.body, md.lsm); ptlrpc_req_finished(request); - if (!lsm || !S_ISREG(inode->i_mode)) { + if (!md.lsm || !S_ISREG(inode->i_mode)) { CDEBUG(D_INODE, "no lsm: not setting attrs on OST\n"); RETURN(0); } @@ -851,8 +856,7 @@ void ll_update_inode(struct inode *inode void ll_read_inode2(struct inode *inode, void *opaque) { - struct ll_read_inode2_cookie *lic = opaque; - struct mds_body *body = lic->lic_body; + struct lustre_md *md = opaque; struct ll_inode_info *lli = ll_i2info(inode); ENTRY; @@ -864,7 +868,7 @@ void ll_read_inode2(struct inode *inode, LASSERT(!lli->lli_smd); /* core attributes from the MDS first */ - ll_update_inode(inode, body, lic->lic_lsm); + ll_update_inode(inode, md->body, md->lsm); /* OIDEBUG(inode); */ Index: namei.c =================================================================== RCS file: /cvsroot/lustre/lustre/llite/namei.c,v retrieving revision 1.156.6.29.2.5 retrieving revision 1.156.6.29.2.6 diff -u -w -b -B -p -r1.156.6.29.2.5 -r1.156.6.29.2.6 --- namei.c 13 Jul 2003 07:29:30 -0000 1.156.6.29.2.5 +++ namei.c 13 Jul 2003 23:15:04 -0000 1.156.6.29.2.6 @@ -51,21 +51,19 @@ static int ll_test_inode(struct inode *i static int ll_test_inode(struct inode *inode, void *opaque) #endif { - struct ll_read_inode2_cookie *lic = opaque; - struct mds_body *body = lic->lic_body; + struct lustre_md *md = opaque; - if (!(lic->lic_body->valid & (OBD_MD_FLGENER | OBD_MD_FLID))) + if (!(md->body->valid & (OBD_MD_FLGENER | OBD_MD_FLID))) CERROR("invalid generation\n"); CDEBUG(D_VFSTRACE, "comparing inode %p ino %lu/%u to body %u/%u\n", inode, inode->i_ino, inode->i_generation, - lic->lic_body->ino, - lic->lic_body->generation); + md->body->ino, md->body->generation); - if (inode->i_generation != lic->lic_body->generation) + if (inode->i_generation != md->body->generation) return 0; /* Apply the attributes in 'opaque' to this inode */ - ll_update_inode(inode, body, lic->lic_lsm); + ll_update_inode(inode, md->body, md->lsm); return 1; } @@ -90,12 +88,12 @@ int ll_set_inode(struct inode *inode, vo return 0; } struct inode *ll_iget(struct super_block *sb, ino_t hash, - struct ll_read_inode2_cookie *lic) + struct lustre_md *md) { struct inode *inode; LASSERT(hash != 0); - inode = iget5_locked(sb, hash, ll_test_inode, ll_set_inode, lic); + inode = iget5_locked(sb, hash, ll_test_inode, ll_set_inode, md); if (!inode) return (NULL); /* removed ERR_PTR(-ENOMEM) -eeb */ @@ -108,11 +106,11 @@ struct inode *ll_iget(struct super_block } #else struct inode *ll_iget(struct super_block *sb, ino_t hash, - struct ll_read_inode2_cookie *lic) + struct lustre_md *md) { struct inode *inode; LASSERT(hash != 0); - inode = iget4(sb, hash, ll_test_inode, lic); + inode = iget4(sb, hash, ll_test_inode, md); CDEBUG(D_VFSTRACE, "inode: %lu/%u(%p)\n", inode->i_ino, inode->i_generation, inode); return inode; @@ -204,6 +202,7 @@ int ll_mdc_blocking_ast(struct ldlm_lock RETURN(0); } +/* this must be held on a lockh that is known to have a referenced lock */ void ll_mdc_lock_set_inode(struct lustre_handle *lockh, struct inode *inode) { struct ldlm_lock *lock = ldlm_handle2lock(lockh); @@ -318,8 +317,9 @@ int ll_intent_lock(struct inode *parent, if (dentry->d_name.len > EXT2_NAME_LEN) RETURN(-ENAMETOOLONG); - /* If a dentry was re-created on the server, revalidate rejects it. - The intent was still executed, so we use that here to proceed. */ + /* This function may be called twice, we only once want to + execute the request associated with the intent. If it was + done already, we skip past this and use the results. */ if (!it_disposition(it, DISP_ENQ_COMPLETE)) { struct mdc_op_data op_data; @@ -495,7 +495,7 @@ lookup2_finish(struct ptlrpc_request *re struct ll_sb_info *sbi = ll_i2sbi(parent); struct dentry *dentry = *de, *saved = *de; struct inode *inode = NULL; - struct ll_read_inode2_cookie lic = {.lic_body = NULL, .lic_lsm = NULL}; + int rc; /* NB 1 request reference will be taken away by ll_intent_lock() * when I return */ @@ -499,57 +499,23 @@ lookup2_finish(struct ptlrpc_request *re /* NB 1 request reference will be taken away by ll_intent_lock() * when I return */ - if (!it_disposition(it, DISP_LOOKUP_NEG)) { ENTRY; + struct lustre_md md; - /* We only get called if the mdc_enqueue() called from - * ll_intent_lock() was successful. Therefore the mds_body - * is present and correct, and the eadata is present if - * body->eadatasize != 0 (but still opaque, so only - * obd_unpackmd() can check the size) */ - lic.lic_body = lustre_msg_buf(request->rq_repmsg, offset, - sizeof (*lic.lic_body)); - LASSERT(lic.lic_body != NULL); - LASSERT_REPSWABBED(request, offset); - - if (S_ISREG(lic.lic_body->mode) && - (lic.lic_body->valid & OBD_MD_FLEASIZE)) { - struct lov_mds_md *lmm; - int lmm_size; - int rc; - - lmm_size = lic.lic_body->eadatasize; - if (lmm_size == 0) { - CERROR("OBD_MD_FLEASIZE set but " - "eadatasize 0\n"); - RETURN(-EPROTO); - } - lmm = lustre_msg_buf(request->rq_repmsg, offset + 1, - lmm_size); - LASSERT(lmm != NULL); - LASSERT_REPSWABBED(request, offset + 1); - - rc = obd_unpackmd(&sbi->ll_osc_conn, - &lic.lic_lsm, lmm, lmm_size); - if (rc < 0) { - CERROR("Error %d unpacking eadata\n", rc); + rc =mdc_req2lustre_md(request, offset, &sbi->ll_osc_conn, &md); + if (rc) RETURN(rc); - } - LASSERT(rc >= sizeof(*lic.lic_lsm)); - } - /* Both ENOMEM and an RPC timeout are possible in ll_iget; which - * to pick? A more generic EIO? -phik */ - inode = ll_iget(dentry->d_sb, ino, &lic); + inode = ll_iget(dentry->d_sb, ino, &md); if (!inode) { /* free the lsm if we allocated one above */ - if (lic.lic_lsm != NULL) - obd_free_memmd(&sbi->ll_osc_conn, &lic.lic_lsm); + if (md.lsm != NULL) + obd_free_memmd(&sbi->ll_osc_conn, &md.lsm); RETURN(-ENOMEM); - } else if (lic.lic_lsm != NULL && - ll_i2info(inode)->lli_smd != lic.lic_lsm) { - obd_free_memmd(&sbi->ll_osc_conn, &lic.lic_lsm); + } else if (md.lsm != NULL && + ll_i2info(inode)->lli_smd != md.lsm) { + obd_free_memmd(&sbi->ll_osc_conn, &md.lsm); } /* If this is a stat, get the authoritative file size */ @@ -654,13 +620,8 @@ static int ll_mdc_unlink(struct inode *d rc = mdc_unlink(&ll_i2sbi(dir)->ll_mdc_conn, &op_data, &request); if (rc) GOTO(out, rc); - - body = lustre_swab_repbuf(request, 0, sizeof(*body), - lustre_swab_mds_body); - if (body == NULL) { - CERROR ("Can't unpack mds_body\n"); - GOTO(out, rc = -EPROTO); - } + /* req is swabbed so this is safe */ + body = lustre_msg_buf(request->rq_repmsg, 0, sizeof(*body)); if (!(body->valid & OBD_MD_FLEASIZE)) GOTO(out, rc = 0); @@ -723,9 +684,9 @@ static struct inode *ll_create_node(stru struct inode *inode; struct ptlrpc_request *request = NULL; struct mds_body *body; - time_t time = LTIME_S(CURRENT_TIME); struct ll_sb_info *sbi = ll_i2sbi(dir); - struct ll_read_inode2_cookie lic; + int rc; + struct lustre_md md; ENTRY; LASSERT(it && it->it_disposition); @@ -733,14 +694,12 @@ static struct inode *ll_create_node(stru ll_invalidate_inode_pages(dir); request = it->it_data; - body = lustre_msg_buf(request->rq_repmsg, 1, sizeof (*body)); - LASSERT (body != NULL); /* checked already */ - LASSERT_REPSWABBED (request, 1); /* swabbed already */ - - lic.lic_body = body; - lic.lic_lsm = NULL; + rc = mdc_req2lustre_md(request, 1, &sbi->ll_osc_conn, &md); + if (rc) { + GOTO(out, inode = ERR_PTR(rc)); + } - inode = ll_iget(dir->i_sb, body->ino, &lic); + inode = ll_iget(dir->i_sb, body->ino, &md); if (!inode || is_bad_inode(inode)) { /* XXX might need iput() for bad inode */ int rc = -EIO; |
From: Peter J. B. <br...@us...> - 2003-07-13 23:15:09
|
Update of /cvsroot/lustre/lustre/mdc In directory sc8-pr-cvs1:/tmp/cvs-serv6774/mdc Modified Files: Tag: b_unify mdc_reint.c mdc_request.c Log Message: - introduce lustre_md and generic method in mdc to pull it out of a request - swab all reint requests in a consistent way Index: mdc_reint.c =================================================================== RCS file: /cvsroot/lustre/lustre/mdc/mdc_reint.c,v retrieving revision 1.45.6.10 retrieving revision 1.45.6.10.2.1 diff -u -w -b -B -p -r1.45.6.10 -r1.45.6.10.2.1 --- mdc_reint.c 8 Jul 2003 21:06:57 -0000 1.45.6.10 +++ mdc_reint.c 13 Jul 2003 23:15:05 -0000 1.45.6.10.2.1 @@ -45,9 +46,13 @@ static int mdc_reint(struct ptlrpc_reque mdc_get_rpc_lock(rpc_lock, NULL); rc = ptlrpc_queue_wait(request); mdc_put_rpc_lock(rpc_lock, NULL); - if (rc) CDEBUG(D_INFO, "error in handling %d\n", rc); + else if (!lustre_swab_repbuf(request, 0, sizeof(struct mds_body), + lustre_swab_mds_body)) { + CERROR ("Can't unpack mds_body\n"); + rc = -EPROTO; + } return rc; } Index: mdc_request.c =================================================================== RCS file: /cvsroot/lustre/lustre/mdc/mdc_request.c,v retrieving revision 1.145.6.25.2.2 retrieving revision 1.145.6.25.2.3 diff -u -w -b -B -p -r1.145.6.25.2.2 -r1.145.6.25.2.3 --- mdc_request.c 11 Jul 2003 10:19:56 -0000 1.145.6.25.2.2 +++ mdc_request.c 13 Jul 2003 23:15:05 -0000 1.145.6.25.2.3 @@ -297,6 +297,46 @@ void mdc_store_inode_generation(struct p rec->cr_replayfid.generation, rec->cr_replayfid.id); } +int mdc_req2lustre_md(struct ptlrpc_request *req, int offset, + struct lustre_handle *obd_import, + struct lustre_md *md) +{ + int rc; + + LASSERT(md); + memset(md, 0, sizeof(*md)); + + md->body = lustre_msg_buf(req->rq_repmsg, offset, sizeof (*md->body)); + LASSERT (md->body != NULL); + LASSERT_REPSWABBED (req, offset); + + if (md->body->valid & OBD_MD_FLEASIZE) { + int lmmsize; + struct lov_mds_md *lmm; + + LASSERT(S_ISREG(md->body->mode)); + + if (md->body->eadatasize == 0) { + CERROR ("OBD_MD_FLEASIZE set, but eadatasize 0\n"); + RETURN(-EPROTO); + } + lmmsize = md->body->eadatasize; + lmm = lustre_msg_buf(req->rq_repmsg, offset + 1, lmmsize); + LASSERT (lmm != NULL); + LASSERT_REPSWABBED (req, offset + 1); + + rc = obd_unpackmd(obd_import, &md->lsm, lmm, lmmsize); + if (rc < 0) { + /* XXX don't know if I should do this... */ + CERROR ("Error %d unpacking eadata\n", rc); + LBUG(); + } + LASSERT (rc >= sizeof (*md->lsm)); + } + RETURN(0); +} + + /* We always reserve enough space in the reply packet for a stripe MD, because * we don't know in advance the file type. */ int mdc_enqueue(struct lustre_handle *conn, @@ -784,6 +824,7 @@ MODULE_AUTHOR("Cluster File Systems, Inc MODULE_DESCRIPTION("Lustre Metadata Client"); MODULE_LICENSE("GPL"); +EXPORT_SYMBOL(mdc_req2lustre_md); EXPORT_SYMBOL(mdc_getstatus); EXPORT_SYMBOL(mdc_getlovinfo); EXPORT_SYMBOL(mdc_enqueue); |
From: Peter J. B. <br...@us...> - 2003-07-13 23:15:07
|
Update of /cvsroot/lustre/lustre/include/linux In directory sc8-pr-cvs1:/tmp/cvs-serv6774/include/linux Modified Files: Tag: b_unify lustre_mds.h Log Message: - introduce lustre_md and generic method in mdc to pull it out of a request - swab all reint requests in a consistent way Index: lustre_mds.h =================================================================== RCS file: /cvsroot/lustre/lustre/include/linux/lustre_mds.h,v retrieving revision 1.96.2.16.2.1 retrieving revision 1.96.2.16.2.2 diff -u -w -b -B -p -r1.96.2.16.2.1 -r1.96.2.16.2.2 --- lustre_mds.h 10 Jul 2003 18:42:11 -0000 1.96.2.16.2.1 +++ lustre_mds.h 13 Jul 2003 23:15:04 -0000 1.96.2.16.2.2 @@ -51,6 +51,11 @@ struct ll_file_data; #define LUSTRE_MDT_NAME "mdt" #define LUSTRE_MDC_NAME "mdc" +struct lustre_md { + struct mds_body *body; + struct lov_stripe_md *lsm; +}; + struct mdc_rpc_lock { struct semaphore rpcl_sem; struct lookup_intent *rpcl_it; @@ -272,6 +277,9 @@ extern int mds_get_lovtgts(struct mds_ob extern int mds_get_lovdesc(struct mds_obd *obd, struct lov_desc *desc); /* mdc/mdc_request.c */ +int mdc_req2lustre_md(struct ptlrpc_request *req, int offset, + struct lustre_handle *obd_import, + struct lustre_md *md); int mdc_enqueue(struct lustre_handle *conn, int lock_type, struct lookup_intent *it, int lock_mode, struct mdc_op_data *enq_data, |
From: Mike S. <sh...@us...> - 2003-07-13 22:37:45
|
Update of /cvsroot/lustre/lustre/obdclass In directory sc8-pr-cvs1:/tmp/cvs-serv2835 Modified Files: Tag: b_devel class_obd.c Log Message: No, actually, b_devel _isn't_ compatible with lustre-21, a.k.a. b_unify. Index: class_obd.c =================================================================== RCS file: /cvsroot/lustre/lustre/obdclass/class_obd.c,v retrieving revision 1.162.2.40 retrieving revision 1.162.2.41 diff -u -w -b -B -p -r1.162.2.40 -r1.162.2.41 --- class_obd.c 13 Jul 2003 21:39:14 -0000 1.162.2.40 +++ class_obd.c 13 Jul 2003 22:37:42 -0000 1.162.2.41 @@ -918,7 +918,7 @@ static void cleanup_obdclass(void) #ifdef __KERNEL__ #include <linux/lustre_version.h> #define LUSTRE_MIN_VERSION 18 -#define LUSTRE_MAX_VERSION 21 +#define LUSTRE_MAX_VERSION 19 #if (LUSTRE_KERNEL_VERSION < LUSTRE_MIN_VERSION) # error Cannot continue: Your Lustre kernel patch is older than the sources #elif (LUSTRE_KERNEL_VERSION > LUSTRE_MAX_VERSION) |
From: Mike S. <sh...@us...> - 2003-07-13 21:39:19
|
Update of /cvsroot/lustre/lustre/obdclass In directory sc8-pr-cvs1:/tmp/cvs-serv29429 Modified Files: Tag: b_devel class_obd.c Log Message: b_devel is compatible with lustre-21. Index: class_obd.c =================================================================== RCS file: /cvsroot/lustre/lustre/obdclass/class_obd.c,v retrieving revision 1.162.2.39 retrieving revision 1.162.2.40 diff -u -w -b -B -p -r1.162.2.39 -r1.162.2.40 --- class_obd.c 5 Jul 2003 22:46:22 -0000 1.162.2.39 +++ class_obd.c 13 Jul 2003 21:39:14 -0000 1.162.2.40 @@ -918,7 +918,7 @@ static void cleanup_obdclass(void) #ifdef __KERNEL__ #include <linux/lustre_version.h> #define LUSTRE_MIN_VERSION 18 -#define LUSTRE_MAX_VERSION 19 +#define LUSTRE_MAX_VERSION 21 #if (LUSTRE_KERNEL_VERSION < LUSTRE_MIN_VERSION) # error Cannot continue: Your Lustre kernel patch is older than the sources #elif (LUSTRE_KERNEL_VERSION > LUSTRE_MAX_VERSION) |
From: Mike S. <sh...@us...> - 2003-07-13 17:52:59
|
Update of /cvsroot/lustre/lustre/ldlm In directory sc8-pr-cvs1:/tmp/cvs-serv28501/ldlm Modified Files: Tag: b_devel ldlm_lockd.c ldlm_request.c Log Message: Remove workaround for BA OSTs granting non-page-aligned/off-by-one lock extents. Index: ldlm_lockd.c =================================================================== RCS file: /cvsroot/lustre/lustre/ldlm/ldlm_lockd.c,v retrieving revision 1.131.2.47 retrieving revision 1.131.2.48 diff -u -w -b -B -p -r1.131.2.47 -r1.131.2.48 --- ldlm_lockd.c 13 Jul 2003 09:33:10 -0000 1.131.2.47 +++ ldlm_lockd.c 13 Jul 2003 17:52:56 -0000 1.131.2.48 @@ -660,17 +660,6 @@ static void ldlm_handle_cp_callback(stru if (lock->l_resource->lr_type == LDLM_EXTENT) { memcpy(&lock->l_extent, &dlm_req->lock_desc.l_extent, sizeof(lock->l_extent)); - - if ((lock->l_extent.end & ~PAGE_MASK) != ~PAGE_MASK) { - /* XXX Old versions of BA OST code have a fencepost bug - * which will cause them to grant a lock that's one - * byte too large. This can be safely removed after BA - * ships their next release -phik (02 Apr 2003) */ - lock->l_extent.end--; - } else if ((lock->l_extent.start & ~PAGE_MASK) == - ~PAGE_MASK) { - lock->l_extent.start++; - } } ldlm_resource_unlink_lock(lock); Index: ldlm_request.c =================================================================== RCS file: /cvsroot/lustre/lustre/ldlm/ldlm_request.c,v retrieving revision 1.86.6.28 retrieving revision 1.86.6.29 diff -u -w -b -B -p -r1.86.6.28 -r1.86.6.29 --- ldlm_request.c 8 Jul 2003 18:25:12 -0000 1.86.6.28 +++ ldlm_request.c 13 Jul 2003 17:52:56 -0000 1.86.6.29 @@ -310,17 +310,6 @@ int ldlm_cli_enqueue(struct lustre_handl body->lock_desc.l_extent.end, reply->lock_extent.start, reply->lock_extent.end); - if ((reply->lock_extent.end & ~PAGE_MASK) != ~PAGE_MASK) { - /* XXX Old versions of BA OST code have a fencepost bug - * which will cause them to grant a lock that's one - * byte too large. This can be safely removed after BA - * ships their next release -phik (02 Apr 2003) */ - reply->lock_extent.end--; - } else if ((reply->lock_extent.start & ~PAGE_MASK) == - ~PAGE_MASK) { - reply->lock_extent.start++; - } - cookie = &reply->lock_extent; /* FIXME bug 267 */ cookielen = sizeof(reply->lock_extent); } |
From: Mike S. <sh...@us...> - 2003-07-13 17:50:58
|
Update of /cvsroot/lustre/lustre/ldlm In directory sc8-pr-cvs1:/tmp/cvs-serv28138/ldlm Modified Files: Tag: b_devel ldlm_lock.c Log Message: Now that we only set l_data when we know what its final result will be, we CERROR if we attempt to set l_data and find it already set. Index: ldlm_lock.c =================================================================== RCS file: /cvsroot/lustre/lustre/ldlm/ldlm_lock.c,v retrieving revision 1.117.6.12 retrieving revision 1.117.6.13 diff -u -w -b -B -p -r1.117.6.12 -r1.117.6.13 --- ldlm_lock.c 27 Jun 2003 17:25:16 -0000 1.117.6.12 +++ ldlm_lock.c 13 Jul 2003 17:50:55 -0000 1.117.6.13 @@ -1056,6 +1056,9 @@ int ldlm_lock_set_data(struct lustre_han if (lock == NULL) RETURN(-EINVAL); + if (lock->l_data != NULL) + LDLM_ERROR(lock, "already has l_data %p", lock->l_data); + lock->l_data = data; LDLM_LOCK_PUT(lock); |
From: Mike S. <sh...@us...> - 2003-07-13 17:50:58
|
Update of /cvsroot/lustre/lustre/llite In directory sc8-pr-cvs1:/tmp/cvs-serv28138/llite Modified Files: Tag: b_devel dcache.c namei.c Log Message: Now that we only set l_data when we know what its final result will be, we CERROR if we attempt to set l_data and find it already set. Index: dcache.c =================================================================== RCS file: /cvsroot/lustre/lustre/llite/dcache.c,v retrieving revision 1.34.6.15 retrieving revision 1.34.6.16 diff -u -w -b -B -p -r1.34.6.15 -r1.34.6.16 --- dcache.c 12 Jul 2003 03:48:40 -0000 1.34.6.15 +++ dcache.c 13 Jul 2003 17:50:55 -0000 1.34.6.16 @@ -162,7 +162,7 @@ static int revalidate2_finish(int flag, if (lsm != NULL && ll_i2info((*de)->d_inode)->lli_smd != lsm) obd_free_memmd (&sbi->ll_osc_conn, &lsm); - CDEBUG(D_DLMTRACE, "changing l_data to inode %p (%lu/%u)\n", + CDEBUG(D_DLMTRACE, "setting l_data to inode %p (%lu/%u)\n", (*de)->d_inode, (*de)->d_inode->i_ino, (*de)->d_inode->i_generation); ldlm_lock_set_data((struct lustre_handle *)it->it_lock_handle, Index: namei.c =================================================================== RCS file: /cvsroot/lustre/lustre/llite/namei.c,v retrieving revision 1.156.6.31 retrieving revision 1.156.6.32 diff -u -w -b -B -p -r1.156.6.31 -r1.156.6.32 --- namei.c 12 Jul 2003 02:38:30 -0000 1.156.6.31 +++ namei.c 13 Jul 2003 17:50:55 -0000 1.156.6.32 @@ -677,7 +677,7 @@ lookup2_finish(int flag, struct ptlrpc_r /* We asked for a lock on the directory, and may have been * granted a lock on the inode. Just in case, fixup the data * pointer. */ - CDEBUG(D_DLMTRACE, "changing l_data to inode %p (%lu/%u)\n", + CDEBUG(D_DLMTRACE, "setting l_data to inode %p (%lu/%u)\n", inode, inode->i_ino, inode->i_generation); ldlm_lock_set_data((struct lustre_handle*)it->it_lock_handle, inode); @@ -792,7 +792,7 @@ static struct inode *ll_create_node(stru /* We asked for a lock on the directory, but were * granted a lock on the inode. Since we finally have * an inode pointer, stuff it in the lock. */ - CDEBUG(D_DLMTRACE, "changing l_data to inode %p (%lu/%u)\n", + CDEBUG(D_DLMTRACE, "setting l_data to inode %p (%lu/%u)\n", inode, inode->i_ino, inode->i_generation); ldlm_lock_set_data((struct lustre_handle*)it->it_lock_handle, inode); |
From: Mike S. <sh...@us...> - 2003-07-13 11:12:14
|
Update of /cvsroot/lustre/lustre/include/linux In directory sc8-pr-cvs1:/tmp/cvs-serv9732/include/linux Modified Files: Tag: b_devel lustre_dlm.h Log Message: Whine to console if we take > obd_timeout to service a request, or grant a lock. Index: lustre_dlm.h =================================================================== RCS file: /cvsroot/lustre/lustre/include/linux/lustre_dlm.h,v retrieving revision 1.79.2.12 retrieving revision 1.79.2.13 diff -u -w -b -B -p -r1.79.2.12 -r1.79.2.13 --- lustre_dlm.h 18 Jun 2003 07:11:58 -0000 1.79.2.12 +++ lustre_dlm.h 13 Jul 2003 11:12:08 -0000 1.79.2.13 @@ -188,6 +188,7 @@ struct ldlm_lock { * it's no longer in use. If the lock is not granted, a process sleeps * on this waitq to learn when it becomes granted. */ wait_queue_head_t l_waitq; + struct timeval l_enqueued_time; }; typedef int (*ldlm_res_compat)(struct ldlm_lock *child, struct ldlm_lock *new); |
From: Mike S. <sh...@us...> - 2003-07-13 09:33:19
|
Update of /cvsroot/lustre/lustre/ldlm In directory sc8-pr-cvs1:/tmp/cvs-serv32044/ldlm Modified Files: Tag: b_devel ldlm_lockd.c Log Message: Whine to console if we take > obd_timeout to service a request, or grant a lock. Index: ldlm_lockd.c =================================================================== RCS file: /cvsroot/lustre/lustre/ldlm/ldlm_lockd.c,v retrieving revision 1.131.2.46 retrieving revision 1.131.2.47 diff -u -w -b -B -p -r1.131.2.46 -r1.131.2.47 --- ldlm_lockd.c 5 Jul 2003 22:46:20 -0000 1.131.2.46 +++ ldlm_lockd.c 13 Jul 2003 09:33:10 -0000 1.131.2.47 @@ -347,10 +347,19 @@ int ldlm_server_blocking_ast(struct ldlm RETURN(rc); } +/* XXX copied from ptlrpc/service.c */ +static long timeval_sub(struct timeval *large, struct timeval *small) +{ + return (large->tv_sec - small->tv_sec) * 1000000 + + (large->tv_usec - small->tv_usec); +} + int ldlm_server_completion_ast(struct ldlm_lock *lock, int flags, void *data) { struct ldlm_request *body; struct ptlrpc_request *req; + struct timeval granted_time; + long total_enqueue_wait; int rc = 0, size = sizeof(*body); ENTRY; @@ -359,6 +368,12 @@ int ldlm_server_completion_ast(struct ld RETURN(-EINVAL); } + do_gettimeofday(&granted_time); + total_enqueue_wait = timeval_sub(&granted_time, &lock->l_enqueued_time); + + if (total_enqueue_wait / 1000000 > obd_timeout) + LDLM_ERROR(lock, "enqueue wait took %ldus", total_enqueue_wait); + req = ptlrpc_prep_req(lock->l_export->exp_ldlm_data.led_import, LDLM_CP_CALLBACK, 1, &size, NULL); if (!req) @@ -370,7 +385,8 @@ int ldlm_server_completion_ast(struct ld body->lock_flags = flags; ldlm_lock2desc(lock, &body->lock_desc); - LDLM_DEBUG(lock, "server preparing completion AST"); + LDLM_DEBUG(lock, "server preparing completion AST (after %ldus wait)", + total_enqueue_wait); req->rq_replen = lustre_msg_size(0, NULL); req->rq_level = LUSTRE_CONN_RECOVER; @@ -447,6 +463,7 @@ int ldlm_handle_enqueue(struct ptlrpc_re if (!lock) GOTO(out, err = -ENOMEM); + do_gettimeofday(&lock->l_enqueued_time); memcpy(&lock->l_remote_handle, &dlm_req->lock_handle1, sizeof(lock->l_remote_handle)); LDLM_DEBUG(lock, "server-side enqueue handler, new lock created"); |
From: Mike S. <sh...@us...> - 2003-07-13 09:33:17
|
Update of /cvsroot/lustre/lustre/ptlrpc In directory sc8-pr-cvs1:/tmp/cvs-serv32044/ptlrpc Modified Files: Tag: b_devel client.c recover.c service.c Log Message: Whine to console if we take > obd_timeout to service a request, or grant a lock. Index: client.c =================================================================== RCS file: /cvsroot/lustre/lustre/ptlrpc/client.c,v retrieving revision 1.115.2.59 retrieving revision 1.115.2.60 diff -u -w -b -B -p -r1.115.2.59 -r1.115.2.60 --- client.c 11 Jul 2003 08:36:04 -0000 1.115.2.59 +++ client.c 13 Jul 2003 09:33:10 -0000 1.115.2.60 @@ -1275,8 +1275,9 @@ restart: (req->rq_level <= imp->imp_level || req->rq_err), &lwi); - DEBUG_REQ(D_HA, req, "\"%s\" awake: (%d > %d)", - current->comm, req->rq_level, imp->imp_level); + DEBUG_REQ(D_HA, req, "\"%s\" awake: (%d > %d or %d == 1)", + current->comm, imp->imp_level, req->rq_level, + req->rq_err); spin_lock_irqsave(&imp->imp_lock, flags); list_del_init(&req->rq_list); @@ -1291,7 +1292,7 @@ restart: GOTO (out, rc); } - CERROR("process %d resumed\n", current->pid); + DEBUG_REQ(D_HA, req, "resumed"); } /* XXX this is the same as ptlrpc_set_wait */ Index: recover.c =================================================================== RCS file: /cvsroot/lustre/lustre/ptlrpc/recover.c,v retrieving revision 1.23.6.35 retrieving revision 1.23.6.36 diff -u -w -b -B -p -r1.23.6.35 -r1.23.6.36 --- recover.c 11 Jul 2003 06:05:22 -0000 1.23.6.35 +++ recover.c 13 Jul 2003 09:33:10 -0000 1.23.6.36 @@ -406,7 +406,7 @@ int ptlrpc_set_import_active(struct obd_ out: /* When activating, mark import valid */ - if (active) { + if (active && !rc) { CDEBUG(D_HA, "setting import %s VALID\n", imp->imp_target_uuid.uuid); spin_lock_irqsave(&imp->imp_lock, flags); Index: service.c =================================================================== RCS file: /cvsroot/lustre/lustre/ptlrpc/service.c,v retrieving revision 1.84.2.21 retrieving revision 1.84.2.22 diff -u -w -b -B -p -r1.84.2.21 -r1.84.2.22 --- service.c 8 Jul 2003 18:56:52 -0000 1.84.2.21 +++ service.c 13 Jul 2003 09:33:10 -0000 1.84.2.22 @@ -387,9 +387,11 @@ static int ptlrpc_main(void *arg) } do_gettimeofday(&finish_time); total = timeval_sub(&finish_time, &start_time); - CDEBUG(D_HA, "request from NID "LPX64" processed in %ldus " - "(%ldus total)\n", event->initiator.nid, total, - timeval_sub(&finish_time, &event->arrival_time)); + + CDEBUG((total / 1000000 > obd_timeout) ? D_ERROR : D_HA, + "request "LPU64" from NID "LPX64" processed in %ldus " + "(%ldus total)\n", request->rq_xid, event->initiator.nid, + total, timeval_sub(&finish_time, &event->arrival_time)); if (svc->svc_stats != NULL) { int opc = opcode_offset(request->rq_reqmsg->opc); |
From: Mike S. <sh...@us...> - 2003-07-13 07:29:33
|
Update of /cvsroot/lustre/lustre/llite In directory sc8-pr-cvs1:/tmp/cvs-serv17947/llite Modified Files: Tag: b_unify namei.c Log Message: Phil's new approach to the inode/lock-data switching and mismatch problem: don't set the lock data until we know what to set it to (that is, until the intent operation has completed, and the server has told us on which resource we have a lock). This means that a NULL l_data is legal in ll_mdc_blocking_ast, as well. Index: namei.c =================================================================== RCS file: /cvsroot/lustre/lustre/llite/namei.c,v retrieving revision 1.156.6.29.2.4 retrieving revision 1.156.6.29.2.5 diff -u -w -b -B -p -r1.156.6.29.2.4 -r1.156.6.29.2.5 --- namei.c 13 Jul 2003 00:32:10 -0000 1.156.6.29.2.4 +++ namei.c 13 Jul 2003 07:29:30 -0000 1.156.6.29.2.5 @@ -166,13 +166,6 @@ int ll_mdc_blocking_ast(struct ldlm_lock struct inode *inode = lock->l_data; ENTRY; - LASSERT(inode != NULL); - if (lock->l_resource->lr_name.name[0] != inode->i_ino || - lock->l_resource->lr_name.name[1] != inode->i_generation) { - LDLM_ERROR(lock, "data mismatch with ino %lu/%lu", - inode->i_ino, inode->i_generation); - } - switch (flag) { case LDLM_CB_BLOCKING: ldlm_lock2handle(lock, &lockh); @@ -184,6 +177,13 @@ int ll_mdc_blocking_ast(struct ldlm_lock break; case LDLM_CB_CANCELING: { /* Invalidate all dentries associated with this inode */ + if (inode == NULL) + break; + if (lock->l_resource->lr_name.name[0] != inode->i_ino || + lock->l_resource->lr_name.name[1] != inode->i_generation) { + LDLM_ERROR(lock, "data mismatch with ino %lu/%lu", + inode->i_ino, inode->i_generation); + } if (S_ISDIR(inode->i_mode)) { CDEBUG(D_INODE, "invalidating inode %lu\n", inode->i_ino); @@ -330,7 +330,7 @@ int ll_intent_lock(struct inode *parent, rc = mdc_enqueue(&sbi->ll_mdc_conn, LDLM_PLAIN, it, ll_intent_to_lock_mode(it), &op_data, &lockh, NULL, 0, ldlm_completion_ast, - ll_mdc_blocking_ast, parent); + ll_mdc_blocking_ast, NULL); if (rc < 0) RETURN(rc); memcpy(it->it_lock_handle, &lockh, sizeof(lockh)); |
From: Mike S. <sh...@us...> - 2003-07-13 00:32:19
|
Update of /cvsroot/lustre/lustre/mds In directory sc8-pr-cvs1:/tmp/cvs-serv7083/mds Modified Files: Tag: b_unify handler.c mds_open.c Log Message: merge b_intent into b_unify, now that we know it passes Index: handler.c =================================================================== RCS file: /cvsroot/lustre/lustre/mds/handler.c,v retrieving revision 1.217.6.38.2.2 retrieving revision 1.217.6.38.2.3 diff -u -w -b -B -p -r1.217.6.38.2.2 -r1.217.6.38.2.3 --- handler.c 11 Jul 2003 10:19:56 -0000 1.217.6.38.2.2 +++ handler.c 13 Jul 2003 00:32:10 -0000 1.217.6.38.2.3 @@ -860,6 +861,7 @@ static int mds_getattr_name(int offset, { struct mds_obd *mds = mds_req2mds(req); struct obd_device *obd = req->rq_export->exp_obd; + struct ldlm_reply *rep = NULL; struct obd_run_ctxt saved; struct mds_body *body; struct dentry *de = NULL, *dchild = NULL; @@ -904,9 +906,11 @@ static int mds_getattr_name(int offset, } LASSERT (offset == 0 || offset == 2); - /* if requests were at offset 2, replies go back at 1 */ - if (offset) + /* if requests were at offset 2, the getattr reply goes back at 1 */ + if (offset) { + rep = lustre_msg_buf(req->rq_repmsg, 0, sizeof (*rep)); offset = 1; + } uc.ouc_fsuid = body->fsuid; uc.ouc_fsgid = body->fsgid; @@ -915,6 +919,7 @@ static int mds_getattr_name(int offset, uc.ouc_suppgid2 = -1; push_ctxt(&saved, &mds->mds_ctxt, &uc); /* Step 1: Lookup/lock parent */ + intent_set_disposition(rep, DISP_LOOKUP_EXECD); de = mds_fid2locked_dentry(obd, &body->fid1, NULL, LCK_PR, &parent_lockh); if (IS_ERR(de)) @@ -936,8 +941,10 @@ static int mds_getattr_name(int offset, cleanup_phase = 2; /* child dentry */ if (dchild->d_inode == NULL) { + intent_set_disposition(rep, DISP_LOOKUP_NEG); GOTO(cleanup, rc = -ENOENT); - } + } else + intent_set_disposition(rep, DISP_LOOKUP_POS); /* Step 3: Lock child */ child_res_id.name[0] = dchild->d_inode->i_ino; @@ -1724,6 +1731,20 @@ static void fixup_handle_for_resent_req( remote_hdl.cookie); } +int intent_disposition(struct ldlm_reply *rep, int flag) +{ + if (!rep) + return 0; + return (rep->lock_policy_res1 & flag); +} + +void intent_set_disposition(struct ldlm_reply *rep, int flag) +{ + if (!rep) + return; + rep->lock_policy_res1 |= flag; +} + static int ldlm_intent_policy(struct ldlm_namespace *ns, struct ldlm_lock **lockp, void *req_cookie, ldlm_mode_t mode, int flags, void *data) @@ -1765,7 +1786,7 @@ static int ldlm_intent_policy(struct ldl RETURN(req->rq_status); rep = lustre_msg_buf(req->rq_repmsg, 0, sizeof (*rep)); - rep->lock_policy_res1 = IT_INTENT_EXEC; + intent_set_disposition(rep, DISP_IT_EXECD); fixup_handle_for_resent_req(req, lock, &lockh); @@ -1773,12 +1794,12 @@ static int ldlm_intent_policy(struct ldl switch ((long)it->opc) { case IT_OPEN: case IT_CREAT|IT_OPEN: +#warning swab here to assert that an mds_open reint packet is following rep->lock_policy_res2 = mds_reint(req, offset, &lockh); - /* We return a dentry to the client if IT_OPEN_POS is - * set, or if we make it to the OPEN portion of the - * programme (which implies that we created) */ - if (!(rep->lock_policy_res1 & IT_OPEN_POS || - rep->lock_policy_res1 & IT_OPEN_OPEN)) + /* We abort the lock if the lookup was negative and + * we did not make it to the OPEN portion */ + if (intent_disposition(rep, DISP_LOOKUP_NEG) && + !intent_disposition(rep, DISP_OPEN_OPEN)) RETURN(ELDLM_LOCK_ABORTED); break; case IT_GETATTR: @@ -1788,8 +1809,11 @@ static int ldlm_intent_policy(struct ldl &lockh); /* FIXME: we need to sit down and decide on who should * set req->rq_status, who should return negative and - * positive return values, and what they all mean. */ - if (rep->lock_policy_res2) + * positive return values, and what they all mean. + * - replay: returns 0 & req->status is old status + * - otherwise: returns req->status */ + if (!intent_disposition(rep, DISP_LOOKUP_POS) || + rep->lock_policy_res2) RETURN(ELDLM_LOCK_ABORTED); if (req->rq_status != 0) { rep->lock_policy_res2 = req->rq_status; Index: mds_open.c =================================================================== RCS file: /cvsroot/lustre/lustre/mds/mds_open.c,v retrieving revision 1.3.6.17.2.1 retrieving revision 1.3.6.17.2.2 diff -u -w -b -B -p -r1.3.6.17.2.1 -r1.3.6.17.2.2 --- mds_open.c 11 Jul 2003 10:19:56 -0000 1.3.6.17.2.1 +++ mds_open.c 13 Jul 2003 00:32:10 -0000 1.3.6.17.2.2 @@ -102,7 +102,7 @@ void reconstruct_open(struct mds_update_ struct dentry *parent, *child; struct ldlm_reply *rep; struct mds_body *body; - int disp, rc; + int rc; struct list_head *t; int put_child = 1; ENTRY; @@ -114,14 +114,13 @@ void reconstruct_open(struct mds_update_ /* copy rc, transno and disp; steal locks */ req->rq_transno = mcd->mcd_last_transno; req->rq_status = mcd->mcd_last_result; - disp = rep->lock_policy_res1 = mcd->mcd_last_data; + intent_set_disposition(rep, mcd->mcd_last_data); if (oldreq) mds_steal_ack_locks(req->rq_export, req); - /* We never care about these. */ - disp &= ~(IT_OPEN_LOOKUP | IT_OPEN_POS | IT_OPEN_NEG); - if (!disp) { + /* Only replay if create or open actually happened. */ + if (!intent_disposition(rep, DISP_OPEN_CREATE | DISP_OPEN_OPEN) ) { EXIT; return; /* error looking up parent or child */ } @@ -136,11 +135,11 @@ void reconstruct_open(struct mds_update_ GOTO(out_dput, 0); /* child not present to open */ } - /* At this point, we know we have a child, which means that we'll send - * it back _unless_ it was open failed, _and_ we didn't create the file. - * I love you guys. No, really. + /* At this point, we know we have a child. We'll send + * it back _unless_ it not created and open failed. */ - if (((disp & (IT_OPEN_OPEN | IT_OPEN_CREATE)) == IT_OPEN_OPEN) && + if (intent_disposition(rep, DISP_OPEN_OPEN) && + !intent_disposition(rep, DISP_OPEN_CREATE) && req->rq_status) { GOTO(out_dput, 0); } @@ -178,7 +177,7 @@ void reconstruct_open(struct mds_update_ /* If we didn't get as far as trying to open, then some locking thing * probably went wrong, and we'll just bail here. */ - if ((disp & IT_OPEN_OPEN) == 0) + if (!intent_disposition(rep, DISP_OPEN_OPEN)) GOTO(out_dput, 0); /* If we failed, then we must have failed opening, so don't look for @@ -390,7 +389,6 @@ int mds_open(struct mds_update_record *r LASSERT(offset == 2); /* If we got here, we must be called via intent */ med = &req->rq_export->exp_mds_data; - rep->lock_policy_res1 |= IT_OPEN_LOOKUP; if (OBD_FAIL_CHECK(OBD_FAIL_MDS_OPEN_PACK)) { CERROR("test case OBD_FAIL_MDS_OPEN_PACK\n"); req->rq_status = -ENOMEM; @@ -452,6 +450,7 @@ int mds_open(struct mds_update_record *r acc_mode |= MAY_WRITE; /* Step 1: Find and lock the parent */ + intent_set_disposition(rep, DISP_LOOKUP_EXECD); parent_mode = (rec->ur_flags & O_CREAT) ? LCK_PW : LCK_PR; parent = mds_fid2locked_dentry(obd, rec->ur_fid1, NULL, parent_mode, &parent_lockh); @@ -472,9 +471,9 @@ int mds_open(struct mds_update_record *r cleanup_phase = 2; /* child dentry */ if (dchild->d_inode) - rep->lock_policy_res1 |= IT_OPEN_POS; + intent_set_disposition(rep, DISP_LOOKUP_POS); else - rep->lock_policy_res1 |= IT_OPEN_NEG; + intent_set_disposition(rep, DISP_LOOKUP_NEG); /* Step 3: If the child was negative, and we're supposed to, * create it. */ @@ -486,7 +485,7 @@ int mds_open(struct mds_update_record *r GOTO(cleanup, rc = -ENOENT); } - rep->lock_policy_res1 |= IT_OPEN_CREATE; + intent_set_disposition(rep, DISP_OPEN_CREATE); handle = fsfilt_start(obd, parent->d_inode, FSFILT_OP_CREATE, NULL); if (IS_ERR(handle)) { @@ -614,7 +613,7 @@ int mds_open(struct mds_update_record *r GOTO(cleanup, rc = -ENOTDIR); /* Step 5: mds_open it */ - rep->lock_policy_res1 |= IT_OPEN_OPEN; + intent_set_disposition(rep, DISP_OPEN_OPEN); openit: /* dentry_open does a dput(de) and mntput(mds->mds_vfsmnt) on error */ mfd = mds_dentry_open(dchild, mds->mds_vfsmnt, @@ -643,7 +642,8 @@ int mds_open(struct mds_update_record *r * ldlm_intent_policy: if we found the dentry, or we tried to * open it (meaning that we created, if it wasn't found), then * we return the lock to the caller and client. */ - if (!(rep->lock_policy_res1 & (IT_OPEN_OPEN | IT_OPEN_POS))) + if (intent_disposition(rep, DISP_LOOKUP_NEG) && + !intent_disposition(rep, DISP_OPEN_OPEN)) ldlm_lock_decref(child_lockh, child_mode); case 2: if (rc || S_ISLNK(dchild->d_inode->i_mode)) |
From: Mike S. <sh...@us...> - 2003-07-13 00:32:16
|
Update of /cvsroot/lustre/lustre/liblustre In directory sc8-pr-cvs1:/tmp/cvs-serv7083/liblustre Modified Files: Tag: b_unify file.c Log Message: merge b_intent into b_unify, now that we know it passes Index: file.c =================================================================== RCS file: /cvsroot/lustre/lustre/liblustre/file.c,v retrieving revision 1.1.4.4 retrieving revision 1.1.4.4.2.1 diff -u -w -b -B -p -r1.1.4.4 -r1.1.4.4.2.1 --- file.c 5 Jul 2003 22:46:21 -0000 1.1.4.4 +++ file.c 13 Jul 2003 00:32:10 -0000 1.1.4.4.2.1 @@ -145,7 +145,7 @@ int llu_create(struct inode *dir, struct it = dentry->d_it; - rc = ll_it_open_error(IT_OPEN_CREATE, it); + rc = ll_it_open_error(DISP_OPEN_CREATE, it); if (rc) { LL_GET_INTENT(dentry, it); ptlrpc_req_finished(it->it_data); @@ -317,7 +317,7 @@ static int llu_file_open(struct inode *i #if 0 CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu\n", inode->i_ino); LL_GET_INTENT(file->f_dentry, it); - rc = ll_it_open_error(IT_OPEN_OPEN, it); + rc = ll_it_open_error(DISP_OPEN_OPEN, it); if (rc) RETURN(rc); #endif |
From: Mike S. <sh...@us...> - 2003-07-13 00:32:16
|
Update of /cvsroot/lustre/lustre/kernel_patches/patches In directory sc8-pr-cvs1:/tmp/cvs-serv7083/kernel_patches/patches Modified Files: Tag: b_unify dev_read_only_2.4.20-rh.patch linux-2.4.20-xattr-0.8.54-chaos.patch Added Files: Tag: b_unify ext3_delete_thread_2.4.20_chaos.patch invalidate_show_2.4.20_chaos.patch tcp_zero_copy_2.4.20_chaos.patch vfs_intent_2.4.20_chaos.patch Log Message: merge b_intent into b_unify, now that we know it passes --- NEW FILE --- fs/ext3/file.c | 4 fs/ext3/inode.c | 116 ++++++++++++++++++++++ fs/ext3/super.c | 230 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/ext3_fs.h | 5 include/linux/ext3_fs_sb.h | 10 + 5 files changed, 365 insertions(+) --- kernel-2.4.20-6chaos_18_7/fs/ext3/super.c~ext3_delete_thread_2.4.20_chaos 2003-07-12 15:35:26.000000000 -0600 +++ kernel-2.4.20-6chaos_18_7-braam/fs/ext3/super.c 2003-07-12 15:36:19.000000000 -0600 @@ -400,6 +400,220 @@ static void dump_orphan_list(struct supe } } +#ifdef EXT3_DELETE_THREAD +/* + * Delete inodes in a loop until there are no more to be deleted. + * Normally, we run in the background doing the deletes and sleeping again, + * and clients just add new inodes to be deleted onto the end of the list. + * If someone is concerned about free space (e.g. block allocation or similar) + * then they can sleep on s_delete_waiter_queue and be woken up when space + * has been freed. + */ +int ext3_delete_thread(void *data) +{ + struct super_block *sb = data; + struct ext3_sb_info *sbi = EXT3_SB(sb); + struct task_struct *tsk = current; + + /* Almost like daemonize, but not quite */ + exit_mm(current); + tsk->session = 1; + tsk->pgrp = 1; + tsk->tty = NULL; + exit_files(current); + reparent_to_init(); + + sprintf(tsk->comm, "kdelext3-%s", kdevname(sb->s_dev)); + sigfillset(&tsk->blocked); + + /*tsk->flags |= PF_KERNTHREAD;*/ + + INIT_LIST_HEAD(&sbi->s_delete_list); + wake_up(&sbi->s_delete_waiter_queue); + ext3_debug("delete thread on %s started\n", kdevname(sb->s_dev)); + + /* main loop */ + for (;;) { + wait_event_interruptible(sbi->s_delete_thread_queue, + !list_empty(&sbi->s_delete_list) || + !test_opt(sb, ASYNCDEL)); + ext3_debug("%s woken up: %lu inodes, %lu blocks\n", + tsk->comm,sbi->s_delete_inodes,sbi->s_delete_blocks); + + spin_lock(&sbi->s_delete_lock); + if (list_empty(&sbi->s_delete_list)) { + clear_opt(sbi->s_mount_opt, ASYNCDEL); + memset(&sbi->s_delete_list, 0, + sizeof(sbi->s_delete_list)); + spin_unlock(&sbi->s_delete_lock); + ext3_debug("delete thread on %s exiting\n", + kdevname(sb->s_dev)); + wake_up(&sbi->s_delete_waiter_queue); + break; + } + + while (!list_empty(&sbi->s_delete_list)) { + struct inode *inode=list_entry(sbi->s_delete_list.next, + struct inode, i_dentry); + unsigned long blocks = inode->i_blocks >> + (inode->i_blkbits - 9); + + list_del_init(&inode->i_dentry); + spin_unlock(&sbi->s_delete_lock); + ext3_debug("%s delete ino %lu blk %lu\n", + tsk->comm, inode->i_ino, blocks); + + iput(inode); + + spin_lock(&sbi->s_delete_lock); + sbi->s_delete_blocks -= blocks; + sbi->s_delete_inodes--; + } + if (sbi->s_delete_blocks != 0 || sbi->s_delete_inodes != 0) { + ext3_warning(sb, __FUNCTION__, + "%lu blocks, %lu inodes on list?\n", + sbi->s_delete_blocks,sbi->s_delete_inodes); + sbi->s_delete_blocks = 0; + sbi->s_delete_inodes = 0; + } + spin_unlock(&sbi->s_delete_lock); + wake_up(&sbi->s_delete_waiter_queue); + } + + return 0; +} + +static void ext3_start_delete_thread(struct super_block *sb) +{ + struct ext3_sb_info *sbi = EXT3_SB(sb); + int rc; + + spin_lock_init(&sbi->s_delete_lock); + init_waitqueue_head(&sbi->s_delete_thread_queue); + init_waitqueue_head(&sbi->s_delete_waiter_queue); + + if (!test_opt(sb, ASYNCDEL)) + return; + + rc = kernel_thread(ext3_delete_thread, sb, CLONE_VM | CLONE_FILES); + if (rc < 0) + printk(KERN_ERR "EXT3-fs: cannot start delete thread: rc %d\n", + rc); + else + wait_event(sbi->s_delete_waiter_queue, sbi->s_delete_list.next); +} + +static void ext3_stop_delete_thread(struct ext3_sb_info *sbi) +{ + if (sbi->s_delete_list.next == 0) /* thread never started */ + return; + + clear_opt(sbi->s_mount_opt, ASYNCDEL); + wake_up(&sbi->s_delete_thread_queue); + wait_event(sbi->s_delete_waiter_queue, list_empty(&sbi->s_delete_list)); +} + +/* Instead of playing games with the inode flags, destruction, etc we just + * create a new inode locally and put it on a list for the truncate thread. + * We need large parts of the inode struct in order to complete the + * truncate and unlink, so we may as well just have a real inode to do it. + * + * If we have any problem deferring the delete, just delete it right away. + * If we defer it, we also mark how many blocks it would free, so that we + * can keep the statfs data correct, and we know if we should sleep on the + * delete thread when we run out of space. + */ +static void ext3_delete_inode_thread(struct inode *old_inode) +{ + struct ext3_sb_info *sbi = EXT3_SB(old_inode->i_sb); + struct ext3_inode_info *nei, *oei = EXT3_I(old_inode); + struct inode *new_inode; + unsigned long blocks = old_inode->i_blocks >> (old_inode->i_blkbits-9); + + if (is_bad_inode(old_inode)) { + clear_inode(old_inode); + return; + } + + if (!test_opt(old_inode->i_sb, ASYNCDEL) || !sbi->s_delete_list.next) + goto out_delete; + + /* We may want to delete the inode immediately and not defer it */ + if (IS_SYNC(old_inode) || blocks <= EXT3_NDIR_BLOCKS) + goto out_delete; + + /* We can't use the delete thread as-is during real orphan recovery, + * as we add to the orphan list here, causing ext3_orphan_cleanup() + * to loop endlessly. It would be nice to do so, but needs work. + */ + if (oei->i_state & EXT3_STATE_DELETE || + sbi->s_mount_state & EXT3_ORPHAN_FS) { + ext3_debug("doing deferred inode %lu delete (%lu blocks)\n", + old_inode->i_ino, blocks); + goto out_delete; + } + + /* We can iget this inode again here, because our caller has unhashed + * old_inode, so new_inode will be in a different inode struct. + * + * We need to ensure that the i_orphan pointers in the other inodes + * point at the new inode copy instead of the old one so the orphan + * list doesn't get corrupted when the old orphan inode is freed. + */ + down(&sbi->s_orphan_lock); + + sbi->s_mount_state |= EXT3_ORPHAN_FS; + new_inode = iget(old_inode->i_sb, old_inode->i_ino); + sbi->s_mount_state &= ~EXT3_ORPHAN_FS; + if (is_bad_inode(new_inode)) { + printk(KERN_WARNING "read bad inode %lu\n", old_inode->i_ino); + iput(new_inode); + new_inode = NULL; + } + if (!new_inode) { + up(&sbi->s_orphan_lock); + ext3_debug("delete inode %lu directly (bad read)\n", + old_inode->i_ino); + goto out_delete; + } + J_ASSERT(new_inode != old_inode); + + J_ASSERT(!list_empty(&oei->i_orphan)); + + nei = EXT3_I(new_inode); + /* Ugh. We need to insert new_inode into the same spot on the list + * as old_inode was, to ensure the in-memory orphan list is still + * in the same order as the on-disk orphan list (badness otherwise). + */ + nei->i_orphan = oei->i_orphan; + nei->i_orphan.next->prev = &nei->i_orphan; + nei->i_orphan.prev->next = &nei->i_orphan; + nei->i_state |= EXT3_STATE_DELETE; + up(&sbi->s_orphan_lock); + + clear_inode(old_inode); + + spin_lock(&sbi->s_delete_lock); + J_ASSERT(list_empty(&new_inode->i_dentry)); + list_add_tail(&new_inode->i_dentry, &sbi->s_delete_list); + sbi->s_delete_blocks += blocks; + sbi->s_delete_inodes++; + spin_unlock(&sbi->s_delete_lock); + + ext3_debug("delete inode %lu (%lu blocks) by thread\n", + new_inode->i_ino, blocks); + + wake_up(&sbi->s_delete_thread_queue); + return; + +out_delete: + ext3_delete_inode(old_inode); +} +#else +#define ext3_start_delete_thread(sbi) do {} while(0) +#define ext3_stop_delete_thread(sbi) do {} while(0) +#endif /* EXT3_DELETE_THREAD */ + void ext3_put_super (struct super_block * sb) { struct ext3_sb_info *sbi = EXT3_SB(sb); @@ -407,6 +621,7 @@ void ext3_put_super (struct super_block kdev_t j_dev = sbi->s_journal->j_dev; int i; + ext3_stop_delete_thread(sbi); ext3_xattr_put_super(sb); journal_destroy(sbi->s_journal); if (!(sb->s_flags & MS_RDONLY)) { @@ -455,7 +670,11 @@ static struct super_operations ext3_sops write_inode: ext3_write_inode, /* BKL not held. Don't need */ dirty_inode: ext3_dirty_inode, /* BKL not held. We take it */ put_inode: ext3_put_inode, /* BKL not held. Don't need */ +#ifdef EXT3_DELETE_THREAD + delete_inode: ext3_delete_inode_thread,/* BKL not held. We take it */ +#else delete_inode: ext3_delete_inode, /* BKL not held. We take it */ +#endif put_super: ext3_put_super, /* BKL held */ write_super: ext3_write_super, /* BKL held */ sync_fs: ext3_sync_fs, @@ -524,6 +743,13 @@ static int parse_options (char * options clear_opt (*mount_options, XATTR_USER); else #endif +#ifdef EXT3_DELETE_THREAD + if (!strcmp(this_char, "asyncdel")) + set_opt(*mount_options, ASYNCDEL); + else if (!strcmp(this_char, "noasyncdel")) + clear_opt(*mount_options, ASYNCDEL); + else +#endif if (!strcmp (this_char, "bsddf")) clear_opt (*mount_options, MINIX_DF); else if (!strcmp (this_char, "nouid32")) { @@ -1223,6 +1449,7 @@ struct super_block * ext3_read_super (st } ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY); + ext3_start_delete_thread(sb); /* * akpm: core read_super() calls in here with the superblock locked. * That deadlocks, because orphan cleanup needs to lock the superblock @@ -1678,6 +1905,9 @@ int ext3_remount (struct super_block * s if (!parse_options(data, &tmp, sbi, &tmp, 1)) return -EINVAL; + if (!test_opt(sb, ASYNCDEL) || (*flags & MS_RDONLY)) + ext3_stop_delete_thread(sbi); + if (sbi->s_mount_opt & EXT3_MOUNT_ABORT) ext3_abort(sb, __FUNCTION__, "Abort forced by user"); --- kernel-2.4.20-6chaos_18_7/fs/ext3/inode.c~ext3_delete_thread_2.4.20_chaos 2003-07-12 15:34:44.000000000 -0600 +++ kernel-2.4.20-6chaos_18_7-braam/fs/ext3/inode.c 2003-07-12 15:36:19.000000000 -0600 @@ -2017,6 +2017,122 @@ out_stop: ext3_journal_stop(handle, inode); } +#ifdef EXT3_DELETE_THREAD +/* Move blocks from to-be-truncated inode over to a new inode, and delete + * that one from the delete thread instead. This avoids a lot of latency + * when truncating large files. + * + * If we have any problem deferring the truncate, just truncate it right away. + * If we defer it, we also mark how many blocks it would free, so that we + * can keep the statfs data correct, and we know if we should sleep on the + * delete thread when we run out of space. + * + * During normal filesystem usage, we are always called here with a + * transaction already started. The only time ext3_truncate is called + * without a started transaction is from ext3_orphan_cleanup(), and we + * currently just do a direct truncate in that case. + */ +void ext3_truncate_thread(struct inode *old_inode) +{ + struct ext3_sb_info *sbi = EXT3_SB(old_inode->i_sb); + struct ext3_inode_info *nei, *oei = EXT3_I(old_inode); + struct inode *new_inode; + handle_t *handle; + unsigned long blocks = old_inode->i_blocks >> (old_inode->i_blkbits-9); + + if (!test_opt(old_inode->i_sb, ASYNCDEL) || !sbi->s_delete_list.next) + goto out_truncate; + + /* XXX This is a temporary limitation for code simplicity. + * We could truncate to arbitrary sizes at some later time. + */ + if (old_inode->i_size != 0) + goto out_truncate; + + /* We may want to truncate the inode immediately and not defer it */ + if (IS_SYNC(old_inode) || blocks <= EXT3_NDIR_BLOCKS || + old_inode->i_size > oei->i_disksize) + goto out_truncate; + + /* We can't use the delete thread as-is during real orphan recovery, + * as we add to the orphan list here, causing ext3_orphan_cleanup() + * to loop endlessly. It would be nice to do so, but needs work. + */ + if (oei->i_state & EXT3_STATE_DELETE || + sbi->s_mount_state & EXT3_ORPHAN_FS) { + ext3_debug("doing deferred inode %lu delete (%lu blocks)\n", + old_inode->i_ino, blocks); + goto out_truncate; + } + + ext3_discard_prealloc(old_inode); + + /* old_inode = 1 + * new_inode = sb + GDT + ibitmap + * orphan list = 1 inode/superblock for add, 2 inodes for del + * quota files = 2 * EXT3_SINGLEDATA_TRANS_BLOCKS + */ + handle = ext3_journal_start(old_inode, 7); + if (IS_ERR(handle)) + goto out_truncate; + + new_inode = ext3_new_inode(handle, old_inode, old_inode->i_mode); + if (IS_ERR(new_inode)) { + ext3_debug("truncate inode %lu directly (no new inodes)\n", + old_inode->i_ino); + goto out_journal; + } + + if (ext3_orphan_add(handle, new_inode) < 0) + goto out_journal; + + if (ext3_orphan_del(handle, old_inode) < 0) { + ext3_orphan_del(handle, new_inode); + iput(new_inode); + goto out_journal; + } + + nei = EXT3_I(new_inode); + + down_write(&oei->truncate_sem); + new_inode->i_size = old_inode->i_size; + new_inode->i_blocks = old_inode->i_blocks; + new_inode->i_uid = old_inode->i_uid; + new_inode->i_gid = old_inode->i_gid; + new_inode->i_nlink = 0; + + /* FIXME when we do arbitrary truncates */ + old_inode->i_blocks = oei->i_file_acl ? old_inode->i_blksize / 512 : 0; + + memcpy(nei->i_data, oei->i_data, sizeof(nei->i_data)); + memset(oei->i_data, 0, sizeof(oei->i_data)); + + nei->i_disksize = oei->i_disksize; + nei->i_state |= EXT3_STATE_DELETE; + up_write(&oei->truncate_sem); + + ext3_journal_stop(handle, old_inode); + + spin_lock(&sbi->s_delete_lock); + J_ASSERT(list_empty(&new_inode->i_dentry)); + list_add_tail(&new_inode->i_dentry, &sbi->s_delete_list); + sbi->s_delete_blocks += blocks; + sbi->s_delete_inodes++; + spin_unlock(&sbi->s_delete_lock); + + ext3_debug("delete inode %lu (%lu blocks) by thread\n", + new_inode->i_ino, blocks); + + wake_up(&sbi->s_delete_thread_queue); + return; + +out_journal: + ext3_journal_stop(handle, old_inode); +out_truncate: + ext3_truncate(old_inode); +} +#endif /* EXT3_DELETE_THREAD */ + /* * ext3_get_inode_loc returns with an extra refcount against the * inode's underlying buffer_head on success. --- kernel-2.4.20-6chaos_18_7/fs/ext3/file.c~ext3_delete_thread_2.4.20_chaos 2003-07-12 15:34:44.000000000 -0600 +++ kernel-2.4.20-6chaos_18_7-braam/fs/ext3/file.c 2003-07-12 15:36:19.000000000 -0600 @@ -125,7 +125,11 @@ struct file_operations ext3_file_operati }; struct inode_operations ext3_file_inode_operations = { +#ifdef EXT3_DELETE_THREAD + truncate: ext3_truncate_thread, /* BKL held */ +#else truncate: ext3_truncate, /* BKL held */ +#endif setattr: ext3_setattr, /* BKL held */ setxattr: ext3_setxattr, /* BKL held */ getxattr: ext3_getxattr, /* BKL held */ --- kernel-2.4.20-6chaos_18_7/include/linux/ext3_fs.h~ext3_delete_thread_2.4.20_chaos 2003-07-12 15:34:44.000000000 -0600 +++ kernel-2.4.20-6chaos_18_7-braam/include/linux/ext3_fs.h 2003-07-12 15:37:13.000000000 -0600 @@ -193,6 +193,7 @@ struct ext3_group_desc */ #define EXT3_STATE_JDATA 0x00000001 /* journaled data exists */ #define EXT3_STATE_NEW 0x00000002 /* inode is newly created */ +#define EXT3_STATE_DELETE 0x00000010 /* deferred delete inode */ /* * ioctl commands @@ -320,6 +321,7 @@ struct ext3_inode { #define EXT3_MOUNT_UPDATE_JOURNAL 0x1000 /* Update the journal format */ #define EXT3_MOUNT_NO_UID32 0x2000 /* Disable 32-bit UIDs */ #define EXT3_MOUNT_XATTR_USER 0x4000 /* Extended user attributes */ +#define EXT3_MOUNT_ASYNCDEL 0x20000 /* Delayed deletion */ /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ #ifndef _LINUX_EXT2_FS_H @@ -695,6 +697,9 @@ extern void ext3_discard_prealloc (struc extern void ext3_dirty_inode(struct inode *); extern int ext3_change_inode_journal_flag(struct inode *, int); extern void ext3_truncate (struct inode *); +#ifdef EXT3_DELETE_THREAD +extern void ext3_truncate_thread(struct inode *inode); +#endif extern void ext3_set_inode_flags(struct inode *); /* ioctl.c */ --- kernel-2.4.20-6chaos_18_7/include/linux/ext3_fs_sb.h~ext3_delete_thread_2.4.20_chaos 2003-07-12 15:35:26.000000000 -0600 +++ kernel-2.4.20-6chaos_18_7-braam/include/linux/ext3_fs_sb.h 2003-07-12 15:36:19.000000000 -0600 @@ -29,6 +29,8 @@ #define EXT3_MAX_GROUP_LOADED 32 +#define EXT3_DELETE_THREAD + /* * third extended-fs super-block data in memory */ @@ -76,6 +78,14 @@ struct ext3_sb_info { struct timer_list turn_ro_timer; /* For turning read-only (crash simulation) */ wait_queue_head_t ro_wait_queue; /* For people waiting for the fs to go read-only */ #endif +#ifdef EXT3_DELETE_THREAD + spinlock_t s_delete_lock; + struct list_head s_delete_list; + unsigned long s_delete_blocks; + unsigned long s_delete_inodes; + wait_queue_head_t s_delete_thread_queue; + wait_queue_head_t s_delete_waiter_queue; +#endif }; #endif /* _LINUX_EXT3_FS_SB */ _ --- NEW FILE --- fs/inode.c | 21 ++++++++++++++------- fs/smbfs/inode.c | 2 +- fs/super.c | 4 ++-- include/linux/fs.h | 2 +- 4 files changed, 18 insertions(+), 11 deletions(-) --- kernel-2.4.20-6chaos_18_7/fs/inode.c~invalidate_show_2.4.20_chaos 2003-05-15 21:14:25.000000000 -0600 +++ kernel-2.4.20-6chaos_18_7-braam/fs/inode.c 2003-07-12 15:33:08.000000000 -0600 @@ -604,7 +604,8 @@ static void dispose_list(struct list_hea /* * Invalidate all inodes for a device. */ -static int invalidate_list(struct list_head *head, struct super_block * sb, struct list_head * dispose) +static int invalidate_list(struct list_head *head, struct super_block * sb, + struct list_head * dispose, int show) { struct list_head *next; int busy = 0, count = 0; @@ -629,6 +630,11 @@ static int invalidate_list(struct list_h count++; continue; } + if (show) + printk(KERN_ERR + "inode busy: dev %s:%lu (%p) mode %o count %u\n", + kdevname(sb->s_dev), inode->i_ino, inode, + inode->i_mode, atomic_read(&inode->i_count)); busy = 1; } /* only unused inodes may be cached with i_count zero */ @@ -647,22 +653,23 @@ static int invalidate_list(struct list_h /** * invalidate_inodes - discard the inodes on a device * @sb: superblock + * @show: whether we should display any busy inodes found * * Discard all of the inodes for a given superblock. If the discard * fails because there are busy inodes then a non zero value is returned. * If the discard is successful all the inodes have been discarded. */ -int invalidate_inodes(struct super_block * sb) +int invalidate_inodes(struct super_block * sb, int show) { int busy; LIST_HEAD(throw_away); spin_lock(&inode_lock); - busy = invalidate_list(&inode_in_use, sb, &throw_away); - busy |= invalidate_list(&inode_unused, sb, &throw_away); - busy |= invalidate_list(&sb->s_dirty, sb, &throw_away); - busy |= invalidate_list(&sb->s_locked_inodes, sb, &throw_away); + busy = invalidate_list(&inode_in_use, sb, &throw_away, show); + busy |= invalidate_list(&inode_unused, sb, &throw_away, show); + busy |= invalidate_list(&sb->s_dirty, sb, &throw_away, show); + busy |= invalidate_list(&sb->s_locked_inodes, sb, &throw_away, show); spin_unlock(&inode_lock); dispose_list(&throw_away); @@ -688,7 +695,7 @@ int invalidate_device(kdev_t dev, int do * hold). */ shrink_dcache_sb(sb); - res = invalidate_inodes(sb); + res = invalidate_inodes(sb, 0); drop_super(sb); } invalidate_buffers(dev); --- kernel-2.4.20-6chaos_18_7/fs/super.c~invalidate_show_2.4.20_chaos 2003-05-15 21:14:25.000000000 -0600 +++ kernel-2.4.20-6chaos_18_7-braam/fs/super.c 2003-07-12 15:31:35.000000000 -0600 @@ -943,7 +943,7 @@ void kill_super(struct super_block *sb) lock_super(sb); lock_kernel(); sb->s_flags &= ~MS_ACTIVE; - invalidate_inodes(sb); /* bad name - it should be evict_inodes() */ + invalidate_inodes(sb, 0); /* bad name - it should be evict_inodes() */ if (sop) { if (sop->write_super && sb->s_dirt) sop->write_super(sb); @@ -952,7 +952,7 @@ void kill_super(struct super_block *sb) } /* Forget any remaining inodes */ - if (invalidate_inodes(sb)) { + if (invalidate_inodes(sb, 1)) { printk(KERN_ERR "VFS: Busy inodes after unmount. " "Self-destruct in 5 seconds. Have a nice day...\n"); } --- kernel-2.4.20-6chaos_18_7/include/linux/fs.h~invalidate_show_2.4.20_chaos 2003-07-12 15:14:02.000000000 -0600 +++ kernel-2.4.20-6chaos_18_7-braam/include/linux/fs.h 2003-07-12 15:31:35.000000000 -0600 @@ -1284,7 +1284,7 @@ static inline void mark_buffer_dirty_ino extern void set_buffer_flushtime(struct buffer_head *); extern void balance_dirty(void); extern int check_disk_change(kdev_t); -extern int invalidate_inodes(struct super_block *); +extern int invalidate_inodes(struct super_block *, int); extern int invalidate_device(kdev_t, int); extern void invalidate_inode_pages(struct inode *); extern void invalidate_inode_pages2(struct address_space *); --- kernel-2.4.20-6chaos_18_7/fs/smbfs/inode.c~invalidate_show_2.4.20_chaos 2003-02-14 15:59:13.000000000 -0700 +++ kernel-2.4.20-6chaos_18_7-braam/fs/smbfs/inode.c 2003-07-12 15:31:35.000000000 -0600 @@ -167,7 +167,7 @@ smb_invalidate_inodes(struct smb_sb_info { VERBOSE("\n"); shrink_dcache_sb(SB_of(server)); - invalidate_inodes(SB_of(server)); + invalidate_inodes(SB_of(server), 0); } /* _ --- NEW FILE --- include/linux/skbuff.h | 30 +++++ include/net/tcp.h | 5 net/core/skbuff.c | 25 ++++ net/ipv4/tcp.c | 252 ++++++++++++++++++++++++++++++++++++++++++++++++- net/netsyms.c | 2 5 files changed, 311 insertions(+), 3 deletions(-) --- kernel-2.4.20-6chaos_18_7/include/linux/skbuff.h~tcp_zero_copy_2.4.20_chaos 2003-06-24 11:31:17.000000000 -0600 +++ kernel-2.4.20-6chaos_18_7-braam/include/linux/skbuff.h 2003-07-12 15:38:07.000000000 -0600 @@ -116,6 +116,30 @@ struct skb_frag_struct __u16 size; }; +/* Support for callback when skb data has been released */ +typedef struct zccd /* Zero Copy Callback Descriptor */ +{ /* (embed as first member of custom struct) */ + atomic_t zccd_count; /* reference count */ + void (*zccd_destructor)(struct zccd *); /* callback when refcount reaches zero */ +} zccd_t; + +static inline void zccd_init (zccd_t *d, void (*callback)(zccd_t *)) +{ + atomic_set (&d->zccd_count, 1); + d->zccd_destructor = callback; +} + +static inline void zccd_get (zccd_t *d) /* take a reference */ +{ + atomic_inc (&d->zccd_count); +} + +static inline void zccd_put (zccd_t *d) /* release a reference */ +{ + if (atomic_dec_and_test (&d->zccd_count)) + (d->zccd_destructor)(d); +} + /* This data is invariant across clones and lives at * the end of the header data, ie. at skb->end. */ @@ -123,6 +147,12 @@ struct skb_shared_info { atomic_t dataref; unsigned int nr_frags; struct sk_buff *frag_list; + zccd_t *zccd; /* zero copy descriptor */ + zccd_t *zccd2; /* 2nd zero copy descriptor */ + /* NB we expect zero-copy data to be at least 1 packet, so + * having 2 zccds means we don't unneccessarily split the packet + * where consecutive zero-copy sends abutt. + */ skb_frag_t frags[MAX_SKB_FRAGS]; }; --- kernel-2.4.20-6chaos_18_7/include/net/tcp.h~tcp_zero_copy_2.4.20_chaos 2003-06-24 11:31:17.000000000 -0600 +++ kernel-2.4.20-6chaos_18_7-braam/include/net/tcp.h 2003-07-12 15:38:07.000000000 -0600 @@ -643,6 +643,8 @@ extern int tcp_v4_tw_remember_stam extern int tcp_sendmsg(struct sock *sk, struct msghdr *msg, int size); extern ssize_t tcp_sendpage(struct socket *sock, struct page *page, int offset, size_t size, int flags); +extern ssize_t tcp_sendpage_zccd(struct socket *sock, struct page *page, int offset, size_t size, + int flags, zccd_t *zccd); extern int tcp_ioctl(struct sock *sk, int cmd, @@ -737,6 +739,9 @@ extern int tcp_recvmsg(struct sock *sk struct msghdr *msg, int len, int nonblock, int flags, int *addr_len); +extern int tcp_recvpackets(struct sock *sk, + struct sk_buff_head *packets, + int len, int nonblock); extern int tcp_listen_start(struct sock *sk); --- kernel-2.4.20-6chaos_18_7/net/netsyms.c~tcp_zero_copy_2.4.20_chaos 2003-05-15 21:15:18.000000000 -0600 +++ kernel-2.4.20-6chaos_18_7-braam/net/netsyms.c 2003-07-12 15:38:54.000000000 -0600 @@ -397,6 +397,8 @@ EXPORT_SYMBOL(sysctl_tcp_wmem); EXPORT_SYMBOL(sysctl_tcp_ecn); EXPORT_SYMBOL(tcp_cwnd_application_limited); EXPORT_SYMBOL(tcp_sendpage); +EXPORT_SYMBOL(tcp_sendpage_zccd); +EXPORT_SYMBOL(tcp_recvpackets); EXPORT_SYMBOL(sysctl_tcp_low_latency); EXPORT_SYMBOL(tcp_write_xmit); --- kernel-2.4.20-6chaos_18_7/net/core/skbuff.c~tcp_zero_copy_2.4.20_chaos 2003-05-15 21:15:21.000000000 -0600 +++ kernel-2.4.20-6chaos_18_7-braam/net/core/skbuff.c 2003-07-12 15:38:07.000000000 -0600 @@ -208,6 +208,8 @@ struct sk_buff *alloc_skb(unsigned int s atomic_set(&(skb_shinfo(skb)->dataref), 1); skb_shinfo(skb)->nr_frags = 0; skb_shinfo(skb)->frag_list = NULL; + skb_shinfo(skb)->zccd = NULL; /* skbuffs kick off with NO user zero copy descriptors */ + skb_shinfo(skb)->zccd2 = NULL; return skb; nodata: @@ -276,6 +278,10 @@ static void skb_release_data(struct sk_b { if (!skb->cloned || atomic_dec_and_test(&(skb_shinfo(skb)->dataref))) { + if (skb_shinfo(skb)->zccd != NULL) /* zero copy callback descriptor? */ + zccd_put (skb_shinfo(skb)->zccd); /* release hold */ + if (skb_shinfo(skb)->zccd2 != NULL) /* 2nd zero copy callback descriptor? */ + zccd_put (skb_shinfo(skb)->zccd2); /* release hold */ if (skb_shinfo(skb)->nr_frags) { int i; for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) @@ -532,6 +538,8 @@ int skb_linearize(struct sk_buff *skb, i atomic_set(&(skb_shinfo(skb)->dataref), 1); skb_shinfo(skb)->nr_frags = 0; skb_shinfo(skb)->frag_list = NULL; + skb_shinfo(skb)->zccd = NULL; /* copied data => no user zero copy descriptor */ + skb_shinfo(skb)->zccd2 = NULL; /* We are no longer a clone, even if we were. */ skb->cloned = 0; @@ -578,6 +586,14 @@ struct sk_buff *pskb_copy(struct sk_buff n->data_len = skb->data_len; n->len = skb->len; + if (skb_shinfo(skb)->zccd != NULL) /* user zero copy descriptor? */ + zccd_get (skb_shinfo(skb)->zccd); /* 1 more ref (pages are shared) */ + skb_shinfo(n)->zccd = skb_shinfo(skb)->zccd; + + if (skb_shinfo(skb)->zccd2 != NULL) /* 2nd user zero copy descriptor? */ + zccd_get (skb_shinfo(skb)->zccd2); /* 1 more ref (pages are shared) */ + skb_shinfo(n)->zccd2 = skb_shinfo(skb)->zccd2; + if (skb_shinfo(skb)->nr_frags) { int i; @@ -620,6 +636,8 @@ int pskb_expand_head(struct sk_buff *skb u8 *data; int size = nhead + (skb->end - skb->head) + ntail; long off; + zccd_t *zccd = skb_shinfo(skb)->zccd; /* stash user zero copy descriptor */ + zccd_t *zccd2 = skb_shinfo(skb)->zccd2; /* stash 2nd user zero copy descriptor */ if (skb_shared(skb)) BUG(); @@ -641,6 +659,11 @@ int pskb_expand_head(struct sk_buff *skb if (skb_shinfo(skb)->frag_list) skb_clone_fraglist(skb); + if (zccd != NULL) /* user zero copy descriptor? */ + zccd_get (zccd); /* extra ref (pages are shared) */ + if (zccd2 != NULL) /* 2nd user zero copy descriptor? */ + zccd_get (zccd2); /* extra ref (pages are shared) */ + skb_release_data(skb); off = (data+nhead) - skb->head; @@ -655,6 +678,8 @@ int pskb_expand_head(struct sk_buff *skb skb->nh.raw += off; skb->cloned = 0; atomic_set(&skb_shinfo(skb)->dataref, 1); + skb_shinfo(skb)->zccd = zccd; + skb_shinfo(skb)->zccd2 = zccd2; return 0; nodata: --- kernel-2.4.20-6chaos_18_7/net/ipv4/tcp.c~tcp_zero_copy_2.4.20_chaos 2003-05-15 21:15:21.000000000 -0600 +++ kernel-2.4.20-6chaos_18_7-braam/net/ipv4/tcp.c 2003-07-12 15:38:07.000000000 -0600 @@ -747,7 +747,7 @@ do_interrupted: goto out; } -ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffset, size_t psize, int flags); +ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffset, size_t psize, int flags, zccd_t *zccd); static inline int can_coalesce(struct sk_buff *skb, int i, struct page *page, int off) @@ -826,7 +826,8 @@ static int tcp_error(struct sock *sk, in return err; } -ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffset, size_t psize, int flags) +/* Extra parameter: user zero copy descriptor (or NULL if not doing that) */ +ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffset, size_t psize, int flags, zccd_t *zccd) { struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp); int mss_now; @@ -874,6 +875,17 @@ new_segment: copy = size; i = skb_shinfo(skb)->nr_frags; + + if (zccd != NULL && /* this is a zcc I/O */ + skb_shinfo(skb)->zccd != NULL && /* skb is part of a zcc I/O */ + skb_shinfo(skb)->zccd2 != NULL && + skb_shinfo(skb)->zccd != zccd && /* not the same one */ + skb_shinfo(skb)->zccd2 != zccd) + { + tcp_mark_push (tp, skb); + goto new_segment; + } + if (can_coalesce(skb, i, page, offset)) { skb_shinfo(skb)->frags[i-1].size += copy; } else if (i < MAX_SKB_FRAGS) { @@ -884,6 +896,20 @@ new_segment: goto new_segment; } + if (zccd != NULL && /* this is a zcc I/O */ + skb_shinfo(skb)->zccd != zccd && /* not already referencing this zccd */ + skb_shinfo(skb)->zccd2 != zccd) + { + zccd_get (zccd); /* bump ref count */ + + BUG_TRAP (skb_shinfo(skb)->zccd2 == NULL); + + if (skb_shinfo(skb)->zccd == NULL) /* reference this zccd */ + skb_shinfo(skb)->zccd = zccd; + else + skb_shinfo(skb)->zccd2 = zccd; + } + skb->len += copy; skb->data_len += copy; skb->ip_summed = CHECKSUM_HW; @@ -947,7 +973,31 @@ ssize_t tcp_sendpage(struct socket *sock lock_sock(sk); TCP_CHECK_TIMER(sk); - res = do_tcp_sendpages(sk, &page, offset, size, flags); + res = do_tcp_sendpages(sk, &page, offset, size, flags, NULL); + TCP_CHECK_TIMER(sk); + release_sock(sk); + return res; +} + +ssize_t tcp_sendpage_zccd(struct socket *sock, struct page *page, int offset, size_t size, + int flags, zccd_t *zccd) +{ + ssize_t res; + struct sock *sk = sock->sk; + +#define TCP_ZC_CSUM_FLAGS (NETIF_F_IP_CSUM|NETIF_F_NO_CSUM|NETIF_F_HW_CSUM) + + if (!(sk->route_caps & NETIF_F_SG) || /* caller shouldn't waste her time */ + !(sk->route_caps & TCP_ZC_CSUM_FLAGS)) /* on double mapping */ + BUG (); + +#undef TCP_ZC_CSUM_FLAGS + + lock_sock(sk); + TCP_CHECK_TIMER(sk); + + res = do_tcp_sendpages(sk, &page, offset, size, flags, zccd); + TCP_CHECK_TIMER(sk); release_sock(sk); return res; @@ -1771,6 +1821,202 @@ recv_urg: goto out; } +int tcp_recvpackets (struct sock *sk, struct sk_buff_head *packets, + int len, int nonblock) +{ + struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp); + int copied; + long timeo; + + BUG_TRAP (len > 0); + /*BUG_TRAP ((flags & (MSG_OOB | MSG_PEEK | MSG_TRUNC)) == 0);*/ + + lock_sock(sk); + + TCP_CHECK_TIMER(sk); + + copied = -ENOTCONN; + if (sk->state == TCP_LISTEN) + goto out; + + copied = 0; + timeo = sock_rcvtimeo(sk, nonblock); + + do { + struct sk_buff * skb; + u32 offset; + unsigned long used; + int exhausted; + int eaten; + + /* Are we at urgent data? Stop if we have read anything. */ + if (copied && tp->urg_data && tp->urg_seq == tp->copied_seq) + break; + + /* We need to check signals first, to get correct SIGURG + * handling. FIXME: Need to check this doesnt impact 1003.1g + * and move it down to the bottom of the loop + */ + if (signal_pending(current)) { + if (copied) + break; + copied = timeo ? sock_intr_errno(timeo) : -EAGAIN; + break; + } + + /* Next get a buffer. */ + + skb = skb_peek(&sk->receive_queue); + + if (skb == NULL) /* nothing ready */ + { + if (copied) { + if (sk->err || + sk->state == TCP_CLOSE || + (sk->shutdown & RCV_SHUTDOWN) || + !timeo || + (0)) + break; + } else { + if (sk->done) + break; + + if (sk->err) { + copied = sock_error(sk); + break; + } + + if (sk->shutdown & RCV_SHUTDOWN) + break; + + if (sk->state == TCP_CLOSE) { + if (!sk->done) { + /* This occurs when user tries to read + * from never connected socket. + */ + copied = -ENOTCONN; + break; + } + break; + } + + if (!timeo) { + copied = -EAGAIN; + break; + } + } + + cleanup_rbuf(sk, copied); + timeo = tcp_data_wait(sk, timeo); + continue; + } + + BUG_TRAP (atomic_read (&skb->users) == 1); + + exhausted = eaten = 0; + + offset = tp->copied_seq - TCP_SKB_CB(skb)->seq; + if (skb->h.th->syn) + offset--; + + used = skb->len - offset; + + if (tp->urg_data) { + u32 urg_offset = tp->urg_seq - tp->copied_seq; + if (urg_offset < used) { + if (!urg_offset) { /* at urgent date */ + if (!sk->urginline) { + tp->copied_seq++; /* discard the single byte of urgent data */ + offset++; + used--; + } + } else /* truncate read */ + used = urg_offset; + } + } + + BUG_TRAP (used >= 0); + if (len < used) + used = len; + + if (used == 0) + exhausted = 1; + else + { + if (skb_is_nonlinear (skb)) + { + int rc = skb_linearize (skb, GFP_KERNEL); + + printk ("tcp_recvpackets(): linearising: %d\n", rc); + + if (rc) + { + if (!copied) + copied = rc; + break; + } + } + + if ((offset + used) == skb->len) /* consuming the whole packet */ + { + __skb_unlink (skb, &sk->receive_queue); + dst_release (skb->dst); + skb_orphan (skb); + __skb_pull (skb, offset); + __skb_queue_tail (packets, skb); + exhausted = eaten = 1; + } + else /* consuming only part of the packet */ + { + struct sk_buff *skb2 = skb_clone (skb, GFP_KERNEL); + + if (skb2 == NULL) + { + if (!copied) + copied = -ENOMEM; + break; + } + + dst_release (skb2->dst); + __skb_pull (skb2, offset); + __skb_trim (skb2, used); + __skb_queue_tail (packets, skb2); + } + + tp->copied_seq += used; + copied += used; + len -= used; + } + + if (tp->urg_data && after(tp->copied_seq,tp->urg_seq)) { + tp->urg_data = 0; + tcp_fast_path_check(sk, tp); + } + + if (!exhausted) + continue; + + if (skb->h.th->fin) + { + tp->copied_seq++; + if (!eaten) + tcp_eat_skb (sk, skb); + break; + } + + if (!eaten) + tcp_eat_skb (sk, skb); + + } while (len > 0); + + out: + /* Clean up data we have read: This will do ACK frames. */ + cleanup_rbuf(sk, copied); + TCP_CHECK_TIMER(sk); + release_sock(sk); + return copied; +} + /* * State processing on a close. This implements the state shift for * sending our FIN frame. Note that we only send a FIN for some _ --- NEW FILE --- fs/dcache.c | 19 ++ fs/exec.c | 15 +- fs/namei.c | 324 ++++++++++++++++++++++++++++++++++++++-------- fs/namespace.c | 28 ++- fs/open.c | 126 +++++++++++++++-- fs/proc/base.c | 3 fs/stat.c | 26 ++- include/linux/dcache.h | 53 +++++++ include/linux/fs.h | 30 +++- include/linux/fs_struct.h | 4 kernel/exit.c | 3 kernel/fork.c | 3 kernel/ksyms.c | 1 13 files changed, 537 insertions(+), 98 deletions(-) --- kernel-2.4.20-6chaos_18_7/fs/exec.c~vfs_intent_2.4.20_chaos 2003-06-19 11:06:09.000000000 -0600 +++ kernel-2.4.20-6chaos_18_7-braam/fs/exec.c 2003-07-12 15:14:02.000000000 -0600 @@ -113,8 +113,9 @@ asmlinkage long sys_uselib(const char * struct file * file; [...1676 lines suppressed...] } else { --- kernel-2.4.20-6chaos_18_7/kernel/exit.c~vfs_intent_2.4.20_chaos 2003-06-19 11:06:09.000000000 -0600 +++ kernel-2.4.20-6chaos_18_7-braam/kernel/exit.c 2003-07-12 15:14:02.000000000 -0600 @@ -241,11 +241,14 @@ static inline void __put_fs_struct(struc { /* No need to hold fs->lock if we are killing it */ if (atomic_dec_and_test(&fs->count)) { + UNPIN(fs->pwd, fs->pwdmnt, 0); + UNPIN(fs->root, fs->rootmnt, 1); dput(fs->root); mntput(fs->rootmnt); dput(fs->pwd); mntput(fs->pwdmnt); if (fs->altroot) { + UNPIN(fs->altroot, fs->altrootmnt, 1); dput(fs->altroot); mntput(fs->altrootmnt); } _ Index: dev_read_only_2.4.20-rh.patch =================================================================== RCS file: /cvsroot/lustre/lustre/kernel_patches/patches/dev_read_only_2.4.20-rh.patch,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.1.6.1 diff -u -w -b -B -p -r1.1.2.1 -r1.1.2.1.6.1 --- dev_read_only_2.4.20-rh.patch 27 May 2003 11:11:02 -0000 1.1.2.1 +++ dev_read_only_2.4.20-rh.patch 13 Jul 2003 00:32:09 -0000 1.1.2.1.6.1 @@ -1,13 +1,10 @@ - - - drivers/block/blkpg.c | 35 +++++++++++++++++++++++++++++++++++ drivers/block/loop.c | 3 +++ - drivers/ide/ide-disk.c | 5 ++++- - 3 files changed, 42 insertions(+), 1 deletion(-) + drivers/ide/ide-disk.c | 5 +++++ + 3 files changed, 43 insertions(+) ---- rh-2.4.20/drivers/block/blkpg.c~dev_read_only_2.4.20 2003-04-11 14:05:03.000000000 +0800 -+++ rh-2.4.20-root/drivers/block/blkpg.c 2003-04-12 13:11:31.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/drivers/block/blkpg.c~dev_read_only_2.4.20-rh 2003-05-15 21:12:48.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/drivers/block/blkpg.c 2003-07-12 15:10:31.000000000 -0600 @@ -297,3 +297,38 @@ int blk_ioctl(kdev_t dev, unsigned int c } @@ -47,8 +44,8 @@ +EXPORT_SYMBOL(dev_set_rdonly); +EXPORT_SYMBOL(dev_check_rdonly); +EXPORT_SYMBOL(dev_clear_rdonly); ---- rh-2.4.20/drivers/block/loop.c~dev_read_only_2.4.20 2003-04-11 14:05:08.000000000 +0800 -+++ rh-2.4.20-root/drivers/block/loop.c 2003-04-12 13:11:31.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/drivers/block/loop.c~dev_read_only_2.4.20-rh 2003-05-15 21:12:50.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/drivers/block/loop.c 2003-07-12 15:10:31.000000000 -0600 @@ -491,6 +491,9 @@ static int loop_make_request(request_que spin_unlock_irq(&lo->lo_lock); @@ -59,17 +56,17 @@ if (lo->lo_flags & LO_FLAGS_READ_ONLY) goto err; } else if (rw == READA) { ---- rh-2.4.20/drivers/ide/ide-disk.c~dev_read_only_2.4.20 2003-04-11 14:04:53.000000000 +0800 -+++ rh-2.4.20-root/drivers/ide/ide-disk.c 2003-04-12 13:14:48.000000000 +0800 -@@ -381,7 +381,10 @@ static ide_startstop_t do_rw_disk (ide_d - if (IS_PDC4030_DRIVE) - return promise_rw_disk(drive, rq, block); - #endif /* CONFIG_BLK_DEV_PDC4030 */ -- +--- kernel-2.4.20-6chaos_18_7/drivers/ide/ide-disk.c~dev_read_only_2.4.20-rh 2003-05-15 21:13:09.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/drivers/ide/ide-disk.c 2003-07-12 15:12:03.000000000 -0600 +@@ -371,6 +371,11 @@ ide_startstop_t __ide_do_rw_disk (ide_dr + if (driver_blocked) + panic("Request while ide driver is blocked?"); + + if (rq->cmd == WRITE && dev_check_rdonly(rq->rq_dev)) { + ide_end_request(1, HWGROUP(drive)); + return ide_stopped; + } ++ if (IDE_CONTROL_REG) hwif->OUTB(drive->ctl, IDE_CONTROL_REG); Index: linux-2.4.20-xattr-0.8.54-chaos.patch =================================================================== RCS file: /cvsroot/lustre/lustre/kernel_patches/patches/linux-2.4.20-xattr-0.8.54-chaos.patch,v retrieving revision 1.1.6.2 retrieving revision 1.1.6.2.12.1 diff -u -w -b -B -p -r1.1.6.2 -r1.1.6.2.12.1 --- linux-2.4.20-xattr-0.8.54-chaos.patch 18 May 2003 16:39:15 -0000 1.1.6.2 +++ linux-2.4.20-xattr-0.8.54-chaos.patch 13 Jul 2003 00:32:09 -0000 1.1.6.2.12.1 @@ -31,6 +31,7 @@ fs/ext2/xattr.c | 1212 +++++++++++++++++++++++++++++++++++++++++ fs/ext2/xattr_user.c | 103 +++ fs/ext3/Makefile | 10 + fs/ext3/ext3-exports.c | 13 fs/ext3/file.c | 5 fs/ext3/ialloc.c | 2 fs/ext3/inode.c | 35 - @@ -59,12 +60,11 @@ include/linux/mbcache.h | 69 ++ kernel/ksyms.c | 4 mm/vmscan.c | 36 + - fs/ext3/ext3-exports.c | 14 + - 62 files changed, 4331 insertions(+), 197 deletions(-) + 62 files changed, 4344 insertions(+), 183 deletions(-) ---- linux-rh-2.4.20-8/Documentation/Configure.help~linux-2.4.20-xattr-0.8.54-chaos 2003-05-07 17:33:50.000000000 +0800 -+++ linux-rh-2.4.20-8-root/Documentation/Configure.help 2003-05-07 17:34:25.000000000 +0800 -@@ -15226,6 +15226,39 @@ CONFIG_EXT2_FS +--- kernel-2.4.20-6chaos_18_7/Documentation/Configure.help~linux-2.4.20-xattr-0.8.54-chaos 2003-06-23 10:39:21.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/Documentation/Configure.help 2003-07-12 15:34:44.000000000 -0600 +@@ -15253,6 +15253,39 @@ CONFIG_EXT2_FS be compiled as a module, and so this could be dangerous. Most everyone wants to say Y here. @@ -104,7 +104,7 @@ Ext3 journalling file system support (EXPERIMENTAL) CONFIG_EXT3_FS This is the journalling version of the Second extended file system -@@ -15258,6 +15291,39 @@ CONFIG_EXT3_FS +@@ -15285,6 +15318,39 @@ CONFIG_EXT3_FS of your root partition (the one containing the directory /) cannot be compiled as a module, and so this may be dangerous. @@ -144,8 +144,8 @@ Journal Block Device support (JBD for ext3) (EXPERIMENTAL) CONFIG_JBD This is a generic journalling layer for block devices. It is ---- linux-rh-2.4.20-8/arch/alpha/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2001-11-20 07:19:42.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/alpha/defconfig 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/alpha/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2002-05-07 15:53:54.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/alpha/defconfig 2003-07-12 15:34:44.000000000 -0600 @@ -1,6 +1,13 @@ # # Automatically generated make config: don't edit @@ -160,8 +160,8 @@ CONFIG_ALPHA=y # CONFIG_UID16 is not set # CONFIG_RWSEM_GENERIC_SPINLOCK is not set ---- linux-rh-2.4.20-8/arch/alpha/kernel/entry.S~linux-2.4.20-xattr-0.8.54-chaos 2003-04-11 14:04:53.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/alpha/kernel/entry.S 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/alpha/kernel/entry.S~linux-2.4.20-xattr-0.8.54-chaos 2003-05-15 21:11:53.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/alpha/kernel/entry.S 2003-07-12 15:34:44.000000000 -0600 @@ -1162,6 +1162,18 @@ sys_call_table: .quad sys_readahead .quad sys_ni_syscall /* 380, sys_security */ @@ -181,8 +181,8 @@ /* Remember to update everything, kids. */ .ifne (. - sys_call_table) - (NR_SYSCALLS * 8) ---- linux-rh-2.4.20-8/arch/arm/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2001-05-20 08:43:05.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/arm/defconfig 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/arm/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2002-05-07 15:53:56.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/arm/defconfig 2003-07-12 15:34:44.000000000 -0600 @@ -1,6 +1,13 @@ # # Automatically generated make config: don't edit @@ -197,8 +197,8 @@ CONFIG_ARM=y # CONFIG_EISA is not set # CONFIG_SBUS is not set ---- linux-rh-2.4.20-8/arch/arm/kernel/calls.S~linux-2.4.20-xattr-0.8.54-chaos 2002-08-03 08:39:42.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/arm/kernel/calls.S 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/arm/kernel/calls.S~linux-2.4.20-xattr-0.8.54-chaos 2002-09-25 11:09:16.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/arm/kernel/calls.S 2003-07-12 15:34:44.000000000 -0600 @@ -240,18 +240,18 @@ __syscall_start: .long SYMBOL_NAME(sys_ni_syscall) /* Security */ .long SYMBOL_NAME(sys_gettid) @@ -230,8 +230,8 @@ .long SYMBOL_NAME(sys_tkill) /* * Please check 2.5 _before_ adding calls here, ---- linux-rh-2.4.20-8/arch/i386/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2003-04-11 14:04:53.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/i386/defconfig 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/i386/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2003-05-15 21:12:00.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/i386/defconfig 2003-07-12 15:34:44.000000000 -0600 @@ -1,6 +1,13 @@ # # Automatically generated make config: don't edit @@ -246,8 +246,8 @@ CONFIG_X86=y CONFIG_ISA=y # CONFIG_SBUS is not set ---- linux-rh-2.4.20-8/arch/ia64/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2003-04-11 14:04:43.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/ia64/defconfig 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/ia64/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2003-05-15 21:12:04.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/ia64/defconfig 2003-07-12 15:34:44.000000000 -0600 @@ -1,6 +1,13 @@ # # Automatically generated make config: don't edit @@ -262,8 +262,8 @@ # # Code maturity level options ---- linux-rh-2.4.20-8/arch/m68k/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2000-06-20 03:56:08.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/m68k/defconfig 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/m68k/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2002-05-07 15:53:55.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/m68k/defconfig 2003-07-12 15:34:44.000000000 -0600 @@ -1,6 +1,13 @@ # # Automatically generated make config: don't edit @@ -278,8 +278,8 @@ CONFIG_UID16=y # ---- linux-rh-2.4.20-8/arch/mips/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2002-11-29 07:53:10.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/mips/defconfig 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/mips/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2003-02-14 15:58:06.000000000 -0700 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/mips/defconfig 2003-07-12 15:34:44.000000000 -0600 @@ -1,6 +1,13 @@ # # Automatically generated make config: don't edit @@ -294,8 +294,8 @@ CONFIG_MIPS=y CONFIG_MIPS32=y # CONFIG_MIPS64 is not set ---- linux-rh-2.4.20-8/arch/mips64/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2002-11-29 07:53:10.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/mips64/defconfig 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/mips64/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2003-02-14 15:58:11.000000000 -0700 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/mips64/defconfig 2003-07-12 15:34:44.000000000 -0600 @@ -1,6 +1,13 @@ # # Automatically generated make config: don't edit @@ -310,8 +310,8 @@ CONFIG_MIPS=y # CONFIG_MIPS32 is not set CONFIG_MIPS64=y ---- linux-rh-2.4.20-8/arch/ppc/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2003-04-11 14:04:43.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/ppc/defconfig 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/ppc/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2003-05-15 21:12:20.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/ppc/defconfig 2003-07-12 15:34:44.000000000 -0600 @@ -1,6 +1,20 @@ # # Automatically generated make config: don't edit @@ -333,8 +333,8 @@ # CONFIG_UID16 is not set # CONFIG_RWSEM_GENERIC_SPINLOCK is not set CONFIG_RWSEM_XCHGADD_ALGORITHM=y ---- linux-rh-2.4.20-8/arch/ppc64/kernel/misc.S~linux-2.4.20-xattr-0.8.54-chaos 2002-11-29 07:53:11.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/ppc64/kernel/misc.S 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/ppc64/kernel/misc.S~linux-2.4.20-xattr-0.8.54-chaos 2003-02-14 15:58:20.000000000 -0700 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/ppc64/kernel/misc.S 2003-07-12 15:34:44.000000000 -0600 @@ -731,6 +731,7 @@ _GLOBAL(sys_call_table32) .llong .sys_gettid /* 207 */ #if 0 /* Reserved syscalls */ @@ -351,8 +351,8 @@ .llong .sys_futex #endif .llong .sys_perfmonctl /* Put this here for now ... */ ---- linux-rh-2.4.20-8/arch/s390/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2002-11-29 07:53:11.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/s390/defconfig 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/s390/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2003-02-14 15:58:20.000000000 -0700 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/s390/defconfig 2003-07-12 15:34:44.000000000 -0600 @@ -1,6 +1,13 @@ # # Automatically generated make config: don't edit @@ -367,8 +367,8 @@ # CONFIG_ISA is not set # CONFIG_EISA is not set # CONFIG_MCA is not set ---- linux-rh-2.4.20-8/arch/s390/kernel/entry.S~linux-2.4.20-xattr-0.8.54-chaos 2002-11-29 07:53:11.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/s390/kernel/entry.S 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/s390/kernel/entry.S~linux-2.4.20-xattr-0.8.54-chaos 2003-02-14 15:58:20.000000000 -0700 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/s390/kernel/entry.S 2003-07-12 15:34:44.000000000 -0600 @@ -558,18 +558,18 @@ sys_call_table: .long sys_fcntl64 .long sys_ni_syscall @@ -400,8 +400,8 @@ .long sys_gettid .long sys_tkill .rept 255-237 ---- linux-rh-2.4.20-8/arch/s390x/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2002-11-29 07:53:11.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/s390x/defconfig 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/s390x/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2003-02-14 15:58:21.000000000 -0700 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/s390x/defconfig 2003-07-12 15:34:44.000000000 -0600 @@ -1,6 +1,13 @@ # # Automatically generated make config: don't edit @@ -416,8 +416,8 @@ # CONFIG_ISA is not set # CONFIG_EISA is not set # CONFIG_MCA is not set ---- linux-rh-2.4.20-8/arch/s390x/kernel/entry.S~linux-2.4.20-xattr-0.8.54-chaos 2002-11-29 07:53:11.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/s390x/kernel/entry.S 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/s390x/kernel/entry.S~linux-2.4.20-xattr-0.8.54-chaos 2003-02-14 15:58:21.000000000 -0700 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/s390x/kernel/entry.S 2003-07-12 15:34:44.000000000 -0600 @@ -591,18 +591,18 @@ sys_call_table: .long SYSCALL(sys_ni_syscall,sys32_fcntl64_wrapper) .long SYSCALL(sys_ni_syscall,sys_ni_syscall) @@ -449,8 +449,8 @@ .long SYSCALL(sys_gettid,sys_gettid) .long SYSCALL(sys_tkill,sys_tkill) .rept 255-237 ---- linux-rh-2.4.20-8/arch/s390x/kernel/wrapper32.S~linux-2.4.20-xattr-0.8.54-chaos 2002-02-26 03:37:56.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/s390x/kernel/wrapper32.S 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/s390x/kernel/wrapper32.S~linux-2.4.20-xattr-0.8.54-chaos 2002-05-07 15:53:59.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/s390x/kernel/wrapper32.S 2003-07-12 15:34:44.000000000 -0600 @@ -1091,3 +1091,95 @@ sys32_fstat64_wrapper: llgtr %r3,%r3 # struct stat64 * llgfr %r4,%r4 # long @@ -547,8 +547,8 @@ + jg sys_fremovexattr + + ---- linux-rh-2.4.20-8/arch/sparc/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2002-08-03 08:39:43.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/sparc/defconfig 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/sparc/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2002-09-25 11:10:50.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/sparc/defconfig 2003-07-12 15:34:44.000000000 -0600 @@ -1,6 +1,13 @@ # # Automatically generated make config: don't edit @@ -563,8 +563,8 @@ CONFIG_UID16=y CONFIG_HIGHMEM=y ---- linux-rh-2.4.20-8/arch/sparc/kernel/systbls.S~linux-2.4.20-xattr-0.8.54-chaos 2002-08-03 08:39:43.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/sparc/kernel/systbls.S 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/sparc/kernel/systbls.S~linux-2.4.20-xattr-0.8.54-chaos 2002-09-25 11:10:52.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/sparc/kernel/systbls.S 2003-07-12 15:34:44.000000000 -0600 @@ -51,11 +51,11 @@ sys_call_table: /*150*/ .long sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_getdents64 /*155*/ .long sys_fcntl64, sys_nis_syscall, sys_statfs, sys_fstatfs, sys_oldumount @@ -582,8 +582,8 @@ /*190*/ .long sys_init_module, sys_personality, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall /*195*/ .long sys_nis_syscall, sys_nis_syscall, sys_getppid, sparc_sigaction, sys_sgetmask /*200*/ .long sys_ssetmask, sys_sigsuspend, sys_newlstat, sys_uselib, old_readdir ---- linux-rh-2.4.20-8/arch/sparc64/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2003-04-11 14:04:43.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/sparc64/defconfig 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/sparc64/defconfig~linux-2.4.20-xattr-0.8.54-chaos 2003-05-15 21:12:29.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/sparc64/defconfig 2003-07-12 15:34:44.000000000 -0600 @@ -1,6 +1,13 @@ # # Automatically generated make config: don't edit @@ -598,8 +598,8 @@ # # Code maturity level options ---- linux-rh-2.4.20-8/arch/sparc64/kernel/systbls.S~linux-2.4.20-xattr-0.8.54-chaos 2002-08-03 08:39:43.000000000 +0800 -+++ linux-rh-2.4.20-8-root/arch/sparc64/kernel/systbls.S 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/arch/sparc64/kernel/systbls.S~linux-2.4.20-xattr-0.8.54-chaos 2002-09-25 11:10:55.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/arch/sparc64/kernel/systbls.S 2003-07-12 15:34:44.000000000 -0600 @@ -52,11 +52,11 @@ sys_call_table32: /*150*/ .word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_getdents64 .word sys32_fcntl64, sys_nis_syscall, sys32_statfs, sys32_fstatfs, sys_oldumount @@ -634,8 +634,8 @@ /*190*/ .word sys_init_module, sparc64_personality, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall .word sys_nis_syscall, sys_nis_syscall, sys_getppid, sys_nis_syscall, sys_sgetmask /*200*/ .word sys_ssetmask, sys_nis_syscall, sys_newlstat, sys_uselib, sys_nis_syscall ---- linux-rh-2.4.20-8/fs/Config.in~linux-2.4.20-xattr-0.8.54-chaos 2003-04-11 14:05:03.000000000 +0800 -+++ linux-rh-2.4.20-8-root/fs/Config.in 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/fs/Config.in~linux-2.4.20-xattr-0.8.54-chaos 2003-05-15 21:14:24.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/fs/Config.in 2003-07-12 15:34:44.000000000 -0600 @@ -34,6 +34,11 @@ dep_mbool ' Debug Befs' CONFIG_BEFS_DEB dep_tristate 'BFS file system support (EXPERIMENTAL)' CONFIG_BFS_FS $CONFIG_EXPERIMENTAL @@ -671,8 +671,8 @@ mainmenu_option next_comment comment 'Partition Types' source fs/partitions/Config.in ---- linux-rh-2.4.20-8/fs/Makefile~linux-2.4.20-xattr-0.8.54-chaos 2003-05-07 17:33:58.000000000 +0800 -+++ linux-rh-2.4.20-8-root/fs/Makefile 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/fs/Makefile~linux-2.4.20-xattr-0.8.54-chaos 2003-07-12 15:33:34.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/fs/Makefile 2003-07-12 15:34:44.000000000 -0600 @@ -84,6 +84,9 @@ obj-y += binfmt_script.o obj-$(CONFIG_BINFMT_ELF) += binfmt_elf.o @@ -683,8 +683,8 @@ # persistent filesystems obj-y += $(join $(subdir-y),$(subdir-y:%=/%.o)) ---- linux-rh-2.4.20-8/fs/ext2/Makefile~linux-2.4.20-xattr-0.8.54-chaos 2001-10-11 23:05:18.000000000 +0800 -+++ linux-rh-2.4.20-8-root/fs/ext2/Makefile 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/fs/ext2/Makefile~linux-2.4.20-xattr-0.8.54-chaos 2002-05-07 15:53:46.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/fs/ext2/Makefile 2003-07-12 15:34:44.000000000 -0600 @@ -13,4 +13,8 @@ obj-y := balloc.o bitmap.o dir.o file ioctl.o namei.o super.o symlink.o obj-m := $(O_TARGET) @@ -694,8 +694,8 @@ +obj-$(CONFIG_EXT2_FS_XATTR_USER) += xattr_user.o + include $(TOPDIR)/Rules.make ---- linux-rh-2.4.20-8/fs/ext2/file.c~linux-2.4.20-xattr-0.8.54-chaos 2001-10-11 23:05:18.000000000 +0800 -+++ linux-rh-2.4.20-8-root/fs/ext2/file.c 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/fs/ext2/file.c~linux-2.4.20-xattr-0.8.54-chaos 2002-05-07 15:53:46.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/fs/ext2/file.c 2003-07-12 15:34:44.000000000 -0600 @@ -20,6 +20,7 @@ #include <linux/fs.h> @@ -713,8 +713,8 @@ + listxattr: ext2_listxattr, + removexattr: ext2_removexattr, }; ---- linux-rh-2.4.20-8/fs/ext2/ialloc.c~linux-2.4.20-xattr-0.8.54-chaos 2002-11-29 07:53:15.000000000 +0800 -+++ linux-rh-2.4.20-8-root/fs/ext2/ialloc.c 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/fs/ext2/ialloc.c~linux-2.4.20-xattr-0.8.54-chaos 2003-02-14 15:59:09.000000000 -0700 ++++ kernel-2.4.20-6chaos_18_7-braam/fs/ext2/ialloc.c 2003-07-12 15:34:44.000000000 -0600 @@ -15,6 +15,7 @@ #include <linux/config.h> #include <linux/fs.h> @@ -731,8 +731,8 @@ DQUOT_FREE_INODE(inode); DQUOT_DROP(inode); } ---- linux-rh-2.4.20-8/fs/ext2/inode.c~linux-2.4.20-xattr-0.8.54-chaos 2002-11-29 07:53:15.000000000 +0800 -+++ linux-rh-2.4.20-8-root/fs/ext2/inode.c 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/fs/ext2/inode.c~linux-2.4.20-xattr-0.8.54-chaos 2003-02-14 15:59:09.000000000 -0700 ++++ kernel-2.4.20-6chaos_18_7-braam/fs/ext2/inode.c 2003-07-12 15:34:44.000000000 -0600 @@ -39,6 +39,18 @@ MODULE_LICENSE("GPL"); static int ext2_update_inode(struct inode * inode, int do_sync); @@ -815,8 +815,8 @@ brelse (bh); inode->i_attr_flags = 0; if (inode->u.ext2_i.i_flags & EXT2_SYNC_FL) { ---- linux-rh-2.4.20-8/fs/ext2/namei.c~linux-2.4.20-xattr-0.8.54-chaos 2001-10-04 13:57:36.000000000 +0800 -+++ linux-rh-2.4.20-8-root/fs/ext2/namei.c 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/fs/ext2/namei.c~linux-2.4.20-xattr-0.8.54-chaos 2002-05-07 15:53:46.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/fs/ext2/namei.c 2003-07-12 15:34:44.000000000 -0600 @@ -31,6 +31,7 @@ #include <linux/fs.h> @@ -850,8 +850,8 @@ + listxattr: ext2_listxattr, + removexattr: ext2_removexattr, }; ---- linux-rh-2.4.20-8/fs/ext2/super.c~linux-2.4.20-xattr-0.8.54-chaos 2002-11-29 07:53:15.000000000 +0800 -+++ linux-rh-2.4.20-8-root/fs/ext2/super.c 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/fs/ext2/super.c~linux-2.4.20-xattr-0.8.54-chaos 2003-02-14 15:59:09.000000000 -0700 ++++ kernel-2.4.20-6chaos_18_7-braam/fs/ext2/super.c 2003-07-12 15:34:44.000000000 -0600 @@ -21,6 +21,7 @@ #include <linux/string.h> #include <linux/fs.h> @@ -921,8 +921,8 @@ } EXPORT_NO_SYMBOLS; ---- linux-rh-2.4.20-8/fs/ext2/symlink.c~linux-2.4.20-xattr-0.8.54-chaos 2000-09-28 04:41:33.000000000 +0800 -+++ linux-rh-2.4.20-8-root/fs/ext2/symlink.c 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/fs/ext2/symlink.c~linux-2.4.20-xattr-0.8.54-chaos 2002-05-07 15:53:46.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/fs/ext2/symlink.c 2003-07-12 15:34:44.000000000 -0600 @@ -19,6 +19,7 @@ #include <linux/fs.h> @@ -952,8 +952,8 @@ + listxattr: ext2_listxattr, + removexattr: ext2_removexattr, }; ---- /dev/null 2003-01-30 18:24:37.000000000 +0800 -+++ linux-rh-2.4.20-8-root/fs/ext2/xattr.c 2003-05-07 17:34:25.000000000 +0800 +--- /dev/null 2003-01-30 03:24:37.000000000 -0700 ++++ kernel-2.4.20-6chaos_18_7-braam/fs/ext2/xattr.c 2003-07-12 15:34:44.000000000 -0600 @@ -0,0 +1,1212 @@ +/* + * linux/fs/ext2/xattr.c @@ -2167,8 +2167,8 @@ +} + +#endif /* CONFIG_EXT2_FS_XATTR_SHARING */ ---- /dev/null 2003-01-30 18:24:37.000000000 +0800 -+++ linux-rh-2.4.20-8-root/fs/ext2/xattr_user.c 2003-05-07 17:34:25.000000000 +0800 +--- /dev/null 2003-01-30 03:24:37.000000000 -0700 ++++ kernel-2.4.20-6chaos_18_7-braam/fs/ext2/xattr_user.c 2003-07-12 15:34:44.000000000 -0600 @@ -0,0 +1,103 @@ +/* + * linux/fs/ext2/xattr_user.c @@ -2273,8 +2273,8 @@ + ext2_xattr_unregister(EXT2_XATTR_INDEX_USER, + &ext2_xattr_user_handler); +} ---- linux-rh-2.4.20-8/fs/ext3/Makefile~linux-2.4.20-xattr-0.8.54-chaos 2003-05-07 17:33:59.000000000 +0800 -+++ linux-rh-2.4.20-8-root/fs/ext3/Makefile 2003-05-07 17:45:13.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/fs/ext3/Makefile~linux-2.4.20-xattr-0.8.54-chaos 2003-07-12 15:33:38.000000000 -0600 ++++ kernel-2.4.20-6chaos_18_7-braam/fs/ext3/Makefile 2003-07-12 15:34:44.000000000 -0600 @@ -1,5 +1,5 @@ # -# Makefile for the linux ext2-filesystem routines. @@ -2299,8 +2299,8 @@ +obj-$(CONFIG_EXT3_FS_XATTR_USER) += xattr_user.o + include $(TOPDIR)/Rules.make ---- linux-rh-2.4.20-8/fs/ext3/file.c~linux-2.4.20-xattr-0.8.54-chaos 2003-05-07 17:33:59.000000000 +0800 -+++ linux-rh-2.4.20-8-root/fs/ext3/file.c 2003-05-07 17:34:25.000000000 +0800 +--- kernel-2.4.20-6chaos_18_7/fs/ext3... [truncated message content] |
From: Mike S. <sh...@us...> - 2003-07-13 00:32:16
|
Update of /cvsroot/lustre/lustre/utils In directory sc8-pr-cvs1:/tmp/cvs-serv7083/utils Modified Files: Tag: b_unify wirecheck.c Log Message: merge b_intent into b_unify, now that we know it passes Index: wirecheck.c =================================================================== RCS file: /cvsroot/lustre/lustre/utils/wirecheck.c,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.2.6.1 diff -u -w -b -B -p -r1.1.2.2 -r1.1.2.2.6.1 --- wirecheck.c 6 Jun 2003 21:43:33 -0000 1.1.2.2 +++ wirecheck.c 13 Jul 2003 00:32:11 -0000 1.1.2.2.6.1 @@ -518,12 +518,12 @@ main (int argc, char **argv) CHECK_VALUE (REINT_OPEN); CHECK_VALUE (REINT_MAX); - CHECK_VALUE (IT_INTENT_EXEC); - CHECK_VALUE (IT_OPEN_LOOKUP); - CHECK_VALUE (IT_OPEN_NEG); - CHECK_VALUE (IT_OPEN_POS); - CHECK_VALUE (IT_OPEN_CREATE); - CHECK_VALUE (IT_OPEN_OPEN); + CHECK_VALUE (DISP_IT_EXECD); + CHECK_VALUE (DISP_LOOKUP_EXECD); + CHECK_VALUE (DISP_LOOKUP_NEG); + CHECK_VALUE (DISP_LOOKUP_POS); + CHECK_VALUE (DISP_OPEN_CREATE); + CHECK_VALUE (DISP_OPEN_OPEN); CHECK_VALUE (MDS_STATUS_CONN); CHECK_VALUE (MDS_STATUS_LOV); |
From: Mike S. <sh...@us...> - 2003-07-13 00:32:15
|
Update of /cvsroot/lustre/lustre/ptlrpc In directory sc8-pr-cvs1:/tmp/cvs-serv7083/ptlrpc Modified Files: Tag: b_unify pack_generic.c Log Message: merge b_intent into b_unify, now that we know it passes Index: pack_generic.c =================================================================== RCS file: /cvsroot/lustre/lustre/ptlrpc/pack_generic.c,v retrieving revision 1.19.6.9 retrieving revision 1.19.6.9.6.1 diff -u -w -b -B -p -r1.19.6.9 -r1.19.6.9.6.1 --- pack_generic.c 27 May 2003 02:39:01 -0000 1.19.6.9 +++ pack_generic.c 13 Jul 2003 00:32:10 -0000 1.19.6.9.6.1 @@ -638,12 +638,12 @@ void lustre_assert_wire_constants (void) LASSERT (REINT_RENAME == 5); LASSERT (REINT_OPEN == 6); LASSERT (REINT_MAX == 6); - LASSERT (IT_INTENT_EXEC == 1); - LASSERT (IT_OPEN_LOOKUP == 2); - LASSERT (IT_OPEN_NEG == 4); - LASSERT (IT_OPEN_POS == 8); - LASSERT (IT_OPEN_CREATE == 16); - LASSERT (IT_OPEN_OPEN == 32); + LASSERT (DISP_IT_EXECD == 1); + LASSERT (DISP_LOOKUP_EXECD == 2); + LASSERT (DISP_LOOKUP_NEG == 4); + LASSERT (DISP_LOOKUP_POS == 8); + LASSERT (DISP_OPEN_CREATE == 16); + LASSERT (DISP_OPEN_OPEN == 32); LASSERT (MDS_STATUS_CONN == 1); LASSERT (MDS_STATUS_LOV == 2); LASSERT (MDS_OPEN_HAS_EA == 1); |
From: Mike S. <sh...@us...> - 2003-07-13 00:32:15
|
Update of /cvsroot/lustre/lustre/llite In directory sc8-pr-cvs1:/tmp/cvs-serv7083/llite Modified Files: Tag: b_unify dcache.c dir.c file.c llite_internal.h llite_lib.c namei.c super.c Log Message: merge b_intent into b_unify, now that we know it passes Index: dcache.c =================================================================== RCS file: /cvsroot/lustre/lustre/llite/dcache.c,v retrieving revision 1.34.6.14.2.4 retrieving revision 1.34.6.14.2.5 diff -u -w -b -B -p -r1.34.6.14.2.4 -r1.34.6.14.2.5 --- dcache.c 12 Jul 2003 04:00:17 -0000 1.34.6.14.2.4 +++ dcache.c 13 Jul 2003 00:32:10 -0000 1.34.6.14.2.5 @@ -84,7 +84,7 @@ void ll_intent_release(struct lookup_int extern struct dentry *ll_find_alias(struct inode *, struct dentry *); -static int revalidate_it_finish(int flag, struct ptlrpc_request *request, +static int revalidate_it_finish(struct ptlrpc_request *request, struct inode *parent, struct dentry **de, struct lookup_intent *it, int offset, obd_id ino) { @@ -99,7 +99,7 @@ static int revalidate_it_finish(int flag /* NB 1 request reference will be taken away by ll_intent_lock() * when I return */ - if ((flag & LL_LOOKUP_NEGATIVE) != 0) + if (it_disposition(it, DISP_LOOKUP_NEG)) GOTO (out, rc = -ENOENT); /* We only get called if the mdc_enqueue() called from @@ -191,8 +191,12 @@ int ll_revalidate_it(struct dentry *de, if (de->d_inode == NULL) RETURN(0); - //if (d_mountpoint(de)) - // RETURN(1); + /* + * never execute intents for mount points + * - attrs will be fixed up in ll_revalidate_inode + */ + if (d_mountpoint(de)) + RETURN(1); if (it) it->it_op_release = ll_intent_release; Index: dir.c =================================================================== RCS file: /cvsroot/lustre/lustre/llite/dir.c,v retrieving revision 1.46.6.15.2.1 retrieving revision 1.46.6.15.2.2 diff -u -w -b -B -p -r1.46.6.15.2.1 -r1.46.6.15.2.2 --- dir.c 10 Jul 2003 18:42:12 -0000 1.46.6.15.2.1 +++ dir.c 13 Jul 2003 00:32:10 -0000 1.46.6.15.2.2 @@ -54,14 +54,6 @@ typedef struct ext2_dir_entry_2 ext2_dir #define PageChecked(page) test_bit(PG_checked, &(page)->flags) #define SetPageChecked(page) set_bit(PG_checked, &(page)->flags) - -static int ll_dir_prepare_write(struct file *file, struct page *page, - unsigned from, unsigned to) -{ - CDEBUG(D_VFSTRACE, "VFS Op:\n"); - return 0; -} - /* returns the page unlocked, but with a reference */ static int ll_dir_readpage(struct file *file, struct page *page) { @@ -137,15 +129,12 @@ static int ll_dir_readpage(struct file * SetPageUptodate(page); unlock_page(page); - ll_unlock(LCK_PR, &lockh); - if (rc != ELDLM_OK) - CERROR("ll_unlock: err: %d\n", rc); + ldlm_lock_decref(&lockh, LCK_PR); return rc; } struct address_space_operations ll_dir_aops = { readpage: ll_dir_readpage, - prepare_write: ll_dir_prepare_write }; /* @@ -168,52 +157,6 @@ static inline unsigned long dir_pages(st return (inode->i_size+PAGE_CACHE_SIZE-1)>>PAGE_CACHE_SHIFT; } -/* - * Remove page from dirty list - */ -static void set_page_clean(struct page *page) -{ - struct address_space *mapping = page->mapping; - struct inode *inode; - - if (!PageDirty(page)) - return; - ClearPageDirty(page); - - if (!mapping) - return; - ll_pgcache_lock(mapping); - - list_del(&page->list); - list_add(&page->list, &mapping->clean_pages); - - /* XXX doesn't inode_lock protect i_state ? */ - inode = mapping->host; - if (list_empty(&mapping->dirty_pages)) { - CDEBUG(D_INODE, "inode clean\n"); - inode->i_state &= ~I_DIRTY_PAGES; - } - - ll_pgcache_unlock(mapping); - EXIT; -} - -static int ext2_commit_chunk(struct page *page, unsigned from, unsigned to) -{ - struct inode *dir = page->mapping->host; - loff_t new_size = (page->index << PAGE_CACHE_SHIFT) + to; - int err = 0; - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) - dir->i_version = ++event; -#endif - if (new_size > dir->i_size) - dir->i_size = new_size; - SetPageUptodate(page); - set_page_clean(page); - - return err; -} static void ext2_check_page(struct page *page) { @@ -327,20 +270,6 @@ fail: return ERR_PTR(-EIO); } -/* - * NOTE! unlike strncmp, ext2_match returns 1 for success, 0 for failure. - * - * len <= EXT2_NAME_LEN and de != NULL are guaranteed by caller. - */ -static inline int ext2_match (int len, const char * const name, - struct ext2_dir_entry_2 * de) -{ - if (len != de->name_len) - return 0; - if (!de->inode) - return 0; - return !memcmp(name, de->name, len); -} /* * p is at least 6 bytes before the end of page @@ -371,33 +300,6 @@ static unsigned char ext2_filetype_table [EXT2_FT_SYMLINK] DT_LNK, }; -static unsigned int ll_dt2fmt[DT_WHT + 1] = { - [EXT2_FT_UNKNOWN] 0, - [EXT2_FT_REG_FILE] S_IFREG, - [EXT2_FT_DIR] S_IFDIR, - [EXT2_FT_CHRDEV] S_IFCHR, - [EXT2_FT_BLKDEV] S_IFBLK, - [EXT2_FT_FIFO] S_IFIFO, - [EXT2_FT_SOCK] S_IFSOCK, - [EXT2_FT_SYMLINK] S_IFLNK -}; - -#define S_SHIFT 12 -static unsigned char ext2_type_by_mode[S_IFMT >> S_SHIFT] = { - [S_IFREG >> S_SHIFT] EXT2_FT_REG_FILE, - [S_IFDIR >> S_SHIFT] EXT2_FT_DIR, - [S_IFCHR >> S_SHIFT] EXT2_FT_CHRDEV, - [S_IFBLK >> S_SHIFT] EXT2_FT_BLKDEV, - [S_IFIFO >> S_SHIFT] EXT2_FT_FIFO, - [S_IFSOCK >> S_SHIFT] EXT2_FT_SOCK, - [S_IFLNK >> S_SHIFT] EXT2_FT_SYMLINK, -}; - -static inline void ext2_set_de_type(ext2_dirent *de, struct inode *inode) -{ - mode_t mode = inode->i_mode; - de->file_type = ext2_type_by_mode[(mode & S_IFMT)>>S_SHIFT]; -} int ll_readdir(struct file * filp, void * dirent, filldir_t filldir) { @@ -466,312 +368,6 @@ done: filp->f_version = inode->i_version; update_atime(inode); RETURN(0); -} - -/* - * ll_ext2_find_entry() - * - * finds an entry in the specified directory with the wanted name. It - * returns the page in which the entry was found, and the entry itself - * (as a parameter - res_dir). Page is returned mapped and unlocked. - * Entry is guaranteed to be valid. - */ -struct ext2_dir_entry_2 * ll_ext2_find_entry (struct inode * dir, - struct dentry *dentry, struct page ** res_page) -{ - const char *name = dentry->d_name.name; - int namelen = dentry->d_name.len; - unsigned reclen = EXT2_DIR_REC_LEN(namelen); - unsigned long start, n; - unsigned long npages = dir_pages(dir); - struct page *page = NULL; - ext2_dirent * de; - - /* OFFSET_CACHE */ - *res_page = NULL; - - // start = dir->u.ext2_i.i_dir_start_lookup; - start = 0; - if (start >= npages) - start = 0; - n = start; - do { - char *kaddr; - page = ll_get_dir_page(dir, n); - if (!IS_ERR(page)) { - kaddr = page_address(page); - de = (ext2_dirent *) kaddr; - kaddr += PAGE_CACHE_SIZE - reclen; - while ((char *) de <= kaddr) { - if (ext2_match (namelen, name, de)) - goto found; - de = ext2_next_entry(de); - } - ext2_put_page(page); - } - if (++n >= npages) - n = 0; - } while (n != start); - return NULL; - -found: - *res_page = page; - // dir->u.ext2_i.i_dir_start_lookup = n; - return de; -} - -struct ext2_dir_entry_2 * ll_ext2_dotdot (struct inode *dir, struct page **p) -{ - struct page *page = ll_get_dir_page(dir, 0); - ext2_dirent *de = NULL; - - if (!IS_ERR(page)) { - de = ext2_next_entry((ext2_dirent *) page_address(page)); - *p = page; - } - return de; -} - -obd_id ll_inode_by_name(struct inode * dir, struct dentry *dentry, int *type) -{ - obd_id res = 0; - struct ext2_dir_entry_2 * de; - struct page *page; - - de = ll_ext2_find_entry (dir, dentry, &page); - if (de) { - res = le32_to_cpu(de->inode); - *type = ll_dt2fmt[de->file_type]; - kunmap(page); - page_cache_release(page); - } - return res; -} - -/* Releases the page */ -void ll_ext2_set_link(struct inode *dir, struct ext2_dir_entry_2 *de, - struct page *page, struct inode *inode) -{ - unsigned from = (char *) de - (char *) page_address(page); - unsigned to = from + le16_to_cpu(de->rec_len); - int err; - - lock_page(page); - err = page->mapping->a_ops->prepare_write(NULL, page, from, to); - if (err) - LBUG(); - de->inode = cpu_to_le32(inode->i_ino); - ext2_set_de_type (de, inode); - dir->i_mtime = dir->i_ctime = CURRENT_TIME; - err = ext2_commit_chunk(page, from, to); - unlock_page(page); - ext2_put_page(page); -} - -/* - * Parent is locked. - */ -int ll_add_link (struct dentry *dentry, struct inode *inode) -{ - struct inode *dir = dentry->d_parent->d_inode; - const char *name = dentry->d_name.name; - int namelen = dentry->d_name.len; - unsigned reclen = EXT2_DIR_REC_LEN(namelen); - unsigned short rec_len, name_len; - struct page *page = NULL; - ext2_dirent * de; - unsigned long npages = dir_pages(dir); - unsigned long n; - char *kaddr; - unsigned from, to; - int err; - - /* We take care of directory expansion in the same loop */ - for (n = 0; n <= npages; n++) { - page = ll_get_dir_page(dir, n); - err = PTR_ERR(page); - if (IS_ERR(page)) - goto out; - kaddr = page_address(page); - de = (ext2_dirent *)kaddr; - kaddr += PAGE_CACHE_SIZE - reclen; - while ((char *)de <= kaddr) { - err = -EEXIST; - if (ext2_match (namelen, name, de)) - goto out_page; - name_len = EXT2_DIR_REC_LEN(de->name_len); - rec_len = le16_to_cpu(de->rec_len); - if ( n==npages && rec_len == 0) { - CERROR("Fatal dir behaviour\n"); - goto out_page; - } - if (!de->inode && rec_len >= reclen) - goto got_it; - if (rec_len >= name_len + reclen) - goto got_it; - de = (ext2_dirent *) ((char *) de + rec_len); - } - ext2_put_page(page); - } - LBUG(); - return -EINVAL; - -got_it: - from = (char*)de - (char*)page_address(page); - to = from + rec_len; - lock_page(page); - err = page->mapping->a_ops->prepare_write(NULL, page, from, to); - if (err) - goto out_unlock; - if (de->inode) { - ext2_dirent *de1 = (ext2_dirent *) ((char *) de + name_len); - de1->rec_len = cpu_to_le16(rec_len - name_len); - de->rec_len = cpu_to_le16(name_len); - de = de1; - } - de->name_len = namelen; - memcpy (de->name, name, namelen); - de->inode = cpu_to_le32(inode->i_ino); - ext2_set_de_type (de, inode); - CDEBUG(D_INODE, "type set to %o\n", de->file_type); - dir->i_mtime = dir->i_ctime = CURRENT_TIME; - err = ext2_commit_chunk(page, from, to); - - // change_inode happens with the commit_chunk - /* XXX OFFSET_CACHE */ - -out_unlock: - unlock_page(page); -out_page: - ext2_put_page(page); -out: - return err; -} - -/* - * ll_ext2_delete_entry deletes a directory entry by merging it with the - * previous entry. Page is up-to-date. Releases the page. - */ -int ll_ext2_delete_entry (struct ext2_dir_entry_2 * dir, struct page * page ) -{ - struct address_space *mapping = page->mapping; - struct inode *inode = mapping->host; - char *kaddr = page_address(page); - unsigned from = ((char*)dir - kaddr) & ~(ext2_chunk_size(inode)-1); - unsigned to = ((char*)dir - kaddr) + le16_to_cpu(dir->rec_len); - ext2_dirent * pde = NULL; - ext2_dirent * de = (ext2_dirent *) (kaddr + from); - int err; - - while ((char*)de < (char*)dir) { - pde = de; - de = ext2_next_entry(de); - } - if (pde) - from = (char*)pde - (char*)page_address(page); - lock_page(page); - err = mapping->a_ops->prepare_write(NULL, page, from, to); - if (err) - LBUG(); - if (pde) - pde->rec_len = cpu_to_le16(to-from); - dir->inode = 0; - inode->i_ctime = inode->i_mtime = CURRENT_TIME; - err = ext2_commit_chunk(page, from, to); - unlock_page(page); - ext2_put_page(page); - return err; -} - -/* - * Set the first fragment of directory. - */ -int ll_ext2_make_empty(struct inode *inode, struct inode *parent) -{ - struct address_space *mapping = inode->i_mapping; - struct page *page = grab_cache_page(mapping, 0); - unsigned chunk_size = ext2_chunk_size(inode); - struct ext2_dir_entry_2 * de; - char *base; - int err; - ENTRY; - - if (!page) - return -ENOMEM; - base = kmap(page); - if (!base) - return -ENOMEM; - - err = mapping->a_ops->prepare_write(NULL, page, 0, chunk_size); - if (err) - goto fail; - - de = (struct ext2_dir_entry_2 *) base; - de->name_len = 1; - de->rec_len = cpu_to_le16(EXT2_DIR_REC_LEN(1)); - memcpy (de->name, ".\0\0", 4); - de->inode = cpu_to_le32(inode->i_ino); - ext2_set_de_type (de, inode); - - de = (struct ext2_dir_entry_2 *) (base + EXT2_DIR_REC_LEN(1)); - de->name_len = 2; - de->rec_len = cpu_to_le16(chunk_size - EXT2_DIR_REC_LEN(1)); - de->inode = cpu_to_le32(parent->i_ino); - memcpy (de->name, "..\0", 4); - ext2_set_de_type (de, inode); - - err = ext2_commit_chunk(page, 0, chunk_size); -fail: - kunmap(page); - unlock_page(page); - page_cache_release(page); - ENTRY; - return err; -} - -/* - * routine to check that the specified directory is empty (for rmdir) - */ -int ll_ext2_empty_dir (struct inode * inode) -{ - struct page *page = NULL; - unsigned long i, npages = dir_pages(inode); - - for (i = 0; i < npages; i++) { - char *kaddr; - ext2_dirent * de; - page = ll_get_dir_page(inode, i); - - if (IS_ERR(page)) - continue; - - kaddr = page_address(page); - de = (ext2_dirent *)kaddr; - kaddr += PAGE_CACHE_SIZE-EXT2_DIR_REC_LEN(1); - - while ((char *)de <= kaddr) { - if (de->inode != 0) { - /* check for . and .. */ - if (de->name[0] != '.') - goto not_empty; - if (de->name_len > 2) - goto not_empty; - if (de->name_len < 2) { - if (de->inode != - cpu_to_le32(inode->i_ino)) - goto not_empty; - } else if (de->name[1] != '.') - goto not_empty; - } - de = ext2_next_entry(de); - } - ext2_put_page(page); - } - return 1; - -not_empty: - ext2_put_page(page); - return 0; } static int ll_dir_ioctl(struct inode *inode, struct file *file, Index: file.c =================================================================== RCS file: /cvsroot/lustre/lustre/llite/file.c,v retrieving revision 1.110.2.55.2.5 retrieving revision 1.110.2.55.2.6 diff -u -w -b -B -p -r1.110.2.55.2.5 -r1.110.2.55.2.6 --- file.c 12 Jul 2003 04:00:21 -0000 1.110.2.55.2.5 +++ file.c 13 Jul 2003 00:32:10 -0000 1.110.2.55.2.6 @@ -368,7 +368,7 @@ int ll_file_open(struct inode *inode, st it = file->f_it; lprocfs_counter_incr(ll_i2sbi(inode)->ll_stats, LPROC_LL_OPEN); - rc = ll_it_open_error(IT_OPEN_OPEN, it); + rc = ll_it_open_error(DISP_OPEN_OPEN, it); if (rc) RETURN(rc); Index: llite_internal.h =================================================================== RCS file: /cvsroot/lustre/lustre/llite/llite_internal.h,v retrieving revision 1.1.2.4.2.6 retrieving revision 1.1.2.4.2.7 diff -u -w -b -B -p -r1.1.2.4.2.6 -r1.1.2.4.2.7 --- llite_internal.h 12 Jul 2003 04:00:22 -0000 1.1.2.4.2.6 +++ llite_internal.h 13 Jul 2003 00:32:10 -0000 1.1.2.4.2.7 @@ -154,7 +154,11 @@ int ll_setattr(struct dentry *de, struct int ll_statfs(struct super_block *sb, struct kstatfs *sfs); void ll_update_inode(struct inode *inode, struct mds_body *body, struct lov_stripe_md *lsm); +int it_disposition(struct lookup_intent *it, int flag); +void it_set_disposition(struct lookup_intent *it, int flag); void ll_read_inode2(struct inode *inode, void *opaque); void ll_umount_begin(struct super_block *sb); + + #endif /* LLITE_INTERNAL_H */ Index: llite_lib.c =================================================================== RCS file: /cvsroot/lustre/lustre/llite/Attic/llite_lib.c,v retrieving revision 1.1.6.5 retrieving revision 1.1.6.6 diff -u -w -b -B -p -r1.1.6.5 -r1.1.6.6 --- llite_lib.c 11 Jul 2003 10:19:55 -0000 1.1.6.5 +++ llite_lib.c 13 Jul 2003 00:32:10 -0000 1.1.6.6 @@ -781,6 +781,15 @@ out: RETURN(rc); } +void dump_lsm(int level, struct lov_stripe_md *lsm) +{ + CDEBUG(level, "objid "LPX64", maxbytes "LPX64", magic %#08x, " + "stripe_size %#08x, offset %u, stripe_count %u\n", + lsm->lsm_object_id, lsm->lsm_maxbytes, lsm->lsm_magic, + lsm->lsm_stripe_size, lsm->lsm_stripe_offset, + lsm->lsm_stripe_count); +} + void ll_update_inode(struct inode *inode, struct mds_body *body, struct lov_stripe_md *lsm) { @@ -882,6 +891,16 @@ void ll_read_inode2(struct inode *inode, #endif EXIT; } +} + +int it_disposition(struct lookup_intent *it, int flag) +{ + return it->it_disposition & flag; +} + +void it_set_disposition(struct lookup_intent *it, int flag) +{ + it->it_disposition |= flag; } void ll_umount_begin(struct super_block *sb) Index: namei.c =================================================================== RCS file: /cvsroot/lustre/lustre/llite/namei.c,v retrieving revision 1.156.6.29.2.3 retrieving revision 1.156.6.29.2.4 diff -u -w -b -B -p -r1.156.6.29.2.3 -r1.156.6.29.2.4 --- namei.c 11 Jul 2003 10:19:55 -0000 1.156.6.29.2.3 +++ namei.c 13 Jul 2003 00:32:10 -0000 1.156.6.29.2.4 @@ -133,22 +133,22 @@ static int ll_intent_to_lock_mode(struct int ll_it_open_error(int phase, struct lookup_intent *it) { - if (it->it_disposition & IT_OPEN_OPEN) { - if (phase == IT_OPEN_OPEN) + if (it_disposition(it, DISP_OPEN_OPEN)) { + if (phase == DISP_OPEN_OPEN) return it->it_status; else return 0; } - if (it->it_disposition & IT_OPEN_CREATE) { - if (phase == IT_OPEN_CREATE) + if (it_disposition(it, DISP_OPEN_CREATE)) { + if (phase == DISP_OPEN_CREATE) return it->it_status; else return 0; } - if (it->it_disposition & IT_OPEN_LOOKUP) { - if (phase == IT_OPEN_LOOKUP) + if (it_disposition(it, DISP_LOOKUP_EXECD)) { + if (phase == DISP_LOOKUP_EXECD) return it->it_status; else return 0; @@ -254,8 +254,33 @@ void ll_prepare_mdc_op_data(struct mdc_o data->mode = mode; } -#define IT_ENQ_COMPLETE (1<<16) - +/* + *This long block is all about fixing up the local state so that it is + *correct as of the moment _before_ the operation was applied; that + *way, the VFS will think that everything is normal and call Lustre's + *regular VFS methods. + * + * If we're performing a creation, that means that unless the creation + * failed with EEXIST, we should fake up a negative dentry. + * + * For everything else, we want to lookup to succeed. + * + * One additional note: if CREATE or OPEN succeeded, we add an extra + * reference to the request because we need to keep it around until + * ll_create/ll_open gets called. + * + * The server will return to us, in it_disposition, an indication of + * exactly what it_status refers to. + * + * If DISP_OPEN_OPEN is set, then it_status refers to the open() call, + * otherwise if DISP_OPEN_CREATE is set, then it status is the + * creation failure mode. In either case, one of DISP_LOOKUP_NEG or + * DISP_LOOKUP_POS will be set, indicating whether the child lookup + * was successful. + * + * Else, if DISP_LOOKUP_EXECD then it_status is the rc of the child + * lookup. + */ int ll_intent_lock(struct inode *parent, struct dentry **de, struct lookup_intent *it, int flags, intent_finish_cb intent_finish) { @@ -264,8 +289,10 @@ int ll_intent_lock(struct inode *parent, struct ll_sb_info *sbi = ll_i2sbi(parent); struct lustre_handle lockh; struct lookup_intent lookup_it = { .it_op = IT_LOOKUP }; - struct ptlrpc_request *request = NULL; - int rc = 0, offset, flag = 0; + struct ptlrpc_request *request; + int rc = 0; + struct mds_body *mds_body; + int mode; obd_id ino = 0; ENTRY; @@ -275,8 +302,12 @@ int ll_intent_lock(struct inode *parent, LBUG(); intent_init(it, IT_LOOKUP, 0); } + if (it->it_op == IT_GETATTR || + it->it_op == 0) + it->it_op = IT_LOOKUP; + #endif - if (!it) + if (!it ||it->it_op == IT_GETXATTR) it = &lookup_it; it->it_op_release = ll_intent_release; @@ -284,15 +315,12 @@ int ll_intent_lock(struct inode *parent, CDEBUG(D_DLMTRACE, "name: %*s, intent: %s\n", dentry->d_name.len, dentry->d_name.name, ldlm_it2str(it->it_op)); - if (it->it_op == IT_GETXATTR || - it->it_op == IT_GETATTR || - it->it_op == 0) - it->it_op = IT_LOOKUP; - if (dentry->d_name.len > EXT2_NAME_LEN) RETURN(-ENAMETOOLONG); - if (!(it->it_disposition & IT_ENQ_COMPLETE)) { + /* If a dentry was re-created on the server, revalidate rejects it. + The intent was still executed, so we use that here to proceed. */ + if (!it_disposition(it, DISP_ENQ_COMPLETE)) { struct mdc_op_data op_data; ll_prepare_mdc_op_data(&op_data, parent, dentry->d_inode, @@ -307,129 +335,68 @@ int ll_intent_lock(struct inode *parent, RETURN(rc); memcpy(it->it_lock_handle, &lockh, sizeof(lockh)); } - - request = (struct ptlrpc_request *)it->it_data; + request = it->it_data; + LASSERT(request != NULL); /* non-zero it_disposition indicates that the server performed the * intent on our behalf. */ - if (it->it_disposition) { - struct mds_body *mds_body; - int mode; - - /* This long block is all about fixing up the local - * state so that it is correct as of the moment - * _before_ the operation was applied; that way, the - * VFS will think that everything is normal and call - * Lustre's regular FS function. - * - * If we're performing a creation, that means that unless the - * creation failed with EEXIST, we should fake up a negative - * dentry. Likewise for the target of a hard link. - * - * For everything else, we want to lookup to succeed. */ + LASSERT(it_disposition(it, DISP_IT_EXECD)); - /* One additional note: if CREATE/MKDIR/etc succeeded, - * we add an extra reference to the request because we - * need to keep it around until ll_create gets called. - * For anything else which results in - * LL_LOOKUP_POSITIVE, we can do the iget() - * immediately with the contents of the reply (in the - * intent_finish callback). In the create case, - * however, we need to wait until ll_create_node to do - * the iget() or the VFS will abort with -EEXISTS. - */ - offset = 1; - mds_body = lustre_msg_buf(request->rq_repmsg, offset, - sizeof(*mds_body)); + mds_body = lustre_msg_buf(request->rq_repmsg, 1, sizeof(*mds_body)); LASSERT(mds_body != NULL); /* mdc_enqueue checked */ - LASSERT_REPSWABBED(request, offset); /* mdc_enqueue swabbed */ + LASSERT_REPSWABBED(request, 1); /* mdc_enqueue swabbed */ + /* XXX everything with fids please, no ino's inode's etc */ ino = mds_body->fid1.id; mode = mds_body->mode; /*We were called from revalidate2: did we find the same inode?*/ - if (inode && (ino != inode->i_ino || + if (inode && + (ino != inode->i_ino || mds_body->fid1.generation != inode->i_generation)) { - it->it_disposition |= IT_ENQ_COMPLETE; + it_set_disposition(it, DISP_ENQ_COMPLETE); RETURN(-ESTALE); } /* If we're doing an IT_OPEN which did not result in an actual * successful open, then we need to remove the bit which saves * this request for unconditional replay. */ - if (it->it_op & IT_OPEN && - (!(it->it_disposition & IT_OPEN_OPEN) || - it->it_status != 0)) { + if (it->it_op & IT_OPEN) { + if (!it_disposition(it, DISP_OPEN_OPEN) || + it->it_status != 0) { unsigned long flags; spin_lock_irqsave (&request->rq_lock, flags); request->rq_replay = 0; spin_unlock_irqrestore (&request->rq_lock, flags); } + } - if (it->it_op & IT_CREAT) { - mdc_store_inode_generation(request, 2, 1); - /* The server will return to us, in it_disposition, an - * indication of exactly what it_status refers to. - * - * If IT_OPEN_OPEN is set, then it_status refers to the - * open() call, otherwise if IT_OPEN_CREATE is set, then - * it status is the creation failure mode. In either - * case, one of IT_OPEN_NEG or IT_OPEN_POS will be set, - * indicating whether the child lookup was successful. - * - * Else, if IT_OPEN_LOOKUP then it_status is the rc - * of the child lookup. - * - * Finally, if none of the bits are set, then the - * failure occurred while looking up the parent. */ - rc = ll_it_open_error(IT_OPEN_LOOKUP, it); + rc = ll_it_open_error(DISP_LOOKUP_EXECD, it); if (rc) GOTO(drop_req, rc); - if (it->it_disposition & IT_OPEN_CREATE) + /* keep requests around for the multiple phases of the call + * this shows the DISP_XX must guarantee we make it into the call + */ + if (it_disposition(it, DISP_OPEN_CREATE)) ptlrpc_request_addref(request); - if (it->it_disposition & IT_OPEN_OPEN) + if (it_disposition(it, DISP_OPEN_OPEN)) ptlrpc_request_addref(request); - if (it->it_disposition & IT_OPEN_NEG) - flag = LL_LOOKUP_NEGATIVE; - else - flag = LL_LOOKUP_POSITIVE; + if (it->it_op & IT_CREAT) { + /* XXX this belongs in ll_create_iit */ } else if (it->it_op == IT_OPEN) { - LASSERT(!(it->it_disposition & IT_OPEN_CREATE)); - - rc = ll_it_open_error(IT_OPEN_LOOKUP, it); - if (rc) - GOTO(drop_req, rc); - - if (it->it_disposition & IT_OPEN_OPEN) - ptlrpc_request_addref(request); - - if (it->it_disposition & IT_OPEN_NEG) - flag = LL_LOOKUP_NEGATIVE; - else - flag = LL_LOOKUP_POSITIVE; - } else if (it->it_op & (IT_GETATTR | IT_LOOKUP)) { - /* For check ops, we want the lookup to succeed */ - it->it_data = NULL; - if (it->it_status) - flag = LL_LOOKUP_NEGATIVE; - else - flag = LL_LOOKUP_POSITIVE; + LASSERT(!it_disposition(it, DISP_OPEN_CREATE)); } else - LBUG(); - } else - LBUG(); /* For the moment, no non-intent locks */ - - LASSERT(request != NULL); + LASSERT(it->it_op & (IT_GETATTR | IT_LOOKUP)); if (intent_finish != NULL) { struct lustre_handle old_lock; struct ldlm_lock *lock; - rc = intent_finish(flag, request, parent, de, it, offset, ino); + rc = intent_finish(request, parent, de, it, 1, ino); dentry = *de; /* intent_finish may change *de */ inode = dentry->d_inode; if (rc != 0) @@ -522,7 +488,7 @@ struct dentry *ll_find_alias(struct inod } static int -lookup2_finish(int flag, struct ptlrpc_request *request, +lookup2_finish(struct ptlrpc_request *request, struct inode *parent, struct dentry **de, struct lookup_intent *it, int offset, obd_id ino) { @@ -534,7 +500,7 @@ lookup2_finish(int flag, struct ptlrpc_r /* NB 1 request reference will be taken away by ll_intent_lock() * when I return */ - if (!(flag & LL_LOOKUP_NEGATIVE)) { + if (!it_disposition(it, DISP_LOOKUP_NEG)) { ENTRY; /* We only get called if the mdc_enqueue() called from @@ -636,6 +602,10 @@ static struct dentry *ll_lookup_it(struc dentry->d_name.name, parent->i_ino, parent->i_generation, parent, LL_IT2STR(it)); + if (d_mountpoint(dentry)) { + CERROR("Tell Peter, lookup on mtpt, it %s\n", LL_IT2STR(it)); + } + rc = ll_intent_lock(parent, &dentry, it, flags, lookup2_finish); if (rc < 0) { CDEBUG(D_INFO, "ll_intent_lock: %d\n", rc); @@ -666,88 +636,6 @@ static struct dentry *ll_lookup_nd(struc } #endif -/* We depend on "mode" being set with the proper file type/umask by now */ -static struct inode *ll_create_node(struct inode *dir, const char *name, - int namelen, const void *data, int datalen, - int mode, __u64 extra, - struct lookup_intent *it) -{ - struct inode *inode; - struct ptlrpc_request *request = NULL; - struct mds_body *body; - time_t time = LTIME_S(CURRENT_TIME); - struct ll_sb_info *sbi = ll_i2sbi(dir); - struct ll_read_inode2_cookie lic; - ENTRY; - - if (it && it->it_disposition) { - ll_invalidate_inode_pages(dir); - request = it->it_data; - body = lustre_msg_buf(request->rq_repmsg, 1, sizeof (*body)); - LASSERT (body != NULL); /* checked already */ - LASSERT_REPSWABBED (request, 1); /* swabbed already */ - } else { - struct mdc_op_data op_data; - int gid = current->fsgid; - int rc; - - if (dir->i_mode & S_ISGID) { - gid = dir->i_gid; - if (S_ISDIR(mode)) - mode |= S_ISGID; - } - - ll_prepare_mdc_op_data(&op_data, dir, NULL, name, namelen, 0); - rc = mdc_create(&sbi->ll_mdc_conn, &op_data, - data, datalen, mode, current->fsuid, gid, - time, extra, &request); - if (rc) { - inode = ERR_PTR(rc); - GOTO(out, rc); - } - body = lustre_swab_repbuf(request, 0, sizeof (*body), - lustre_swab_mds_body); - if (body == NULL) { - CERROR ("Can't unpack mds_body\n"); - GOTO (out, inode = ERR_PTR(-EPROTO)); - } - } - - lic.lic_body = body; - lic.lic_lsm = NULL; - - inode = ll_iget(dir->i_sb, body->ino, &lic); - if (!inode || is_bad_inode(inode)) { - /* XXX might need iput() for bad inode */ - int rc = -EIO; - CERROR("new_inode -fatal: rc %d\n", rc); - LBUG(); - GOTO(out, rc); - } - - if (!list_empty(&inode->i_dentry)) { - CERROR("new_inode -fatal: inode %d, ct %d lnk %d\n", - body->ino, atomic_read(&inode->i_count), - inode->i_nlink); - iput(inode); - LBUG(); - inode = ERR_PTR(-EIO); - GOTO(out, -EIO); - } - - if (it && it->it_disposition) { - /* We asked for a lock on the directory, but were - * granted a lock on the inode. Since we finally have - * an inode pointer, stuff it in the lock. */ - ll_mdc_lock_set_inode((struct lustre_handle*)it->it_lock_handle, - inode); - } - - EXIT; - out: - ptlrpc_req_finished(request); - return inode; -} static int ll_mdc_unlink(struct inode *dir, struct inode *child, __u32 mode, const char *name, int len) @@ -826,6 +714,54 @@ static int ll_mdc_unlink(struct inode *d return rc; } +/* We depend on "mode" being set with the proper file type/umask by now */ +static struct inode *ll_create_node(struct inode *dir, const char *name, + int namelen, const void *data, int datalen, + int mode, __u64 extra, + struct lookup_intent *it) +{ + struct inode *inode; + struct ptlrpc_request *request = NULL; + struct mds_body *body; + time_t time = LTIME_S(CURRENT_TIME); + struct ll_sb_info *sbi = ll_i2sbi(dir); + struct ll_read_inode2_cookie lic; + ENTRY; + + LASSERT(it && it->it_disposition); + + ll_invalidate_inode_pages(dir); + + request = it->it_data; + body = lustre_msg_buf(request->rq_repmsg, 1, sizeof (*body)); + LASSERT (body != NULL); /* checked already */ + LASSERT_REPSWABBED (request, 1); /* swabbed already */ + + lic.lic_body = body; + lic.lic_lsm = NULL; + + inode = ll_iget(dir->i_sb, body->ino, &lic); + if (!inode || is_bad_inode(inode)) { + /* XXX might need iput() for bad inode */ + int rc = -EIO; + CERROR("new_inode -fatal: rc %d\n", rc); + LBUG(); + GOTO(out, rc); + } + LASSERT(list_empty(&inode->i_dentry)); + + /* We asked for a lock on the directory, but were granted a + * lock on the inode. Since we finally have an inode pointer, + * stuff it in the lock. */ + ll_mdc_lock_set_inode((struct lustre_handle*)it->it_lock_handle, + inode); + + EXIT; + out: + ptlrpc_req_finished(request); + return inode; +} + /* * By the time this is called, we already have created the directory cache * entry for the new file, but it is so far negative - it has no inode. @@ -843,6 +779,7 @@ static int ll_mdc_unlink(struct inode *d static int ll_create_it(struct inode *dir, struct dentry *dentry, int mode, struct lookup_intent *it) { struct inode *inode; + struct ptlrpc_request *request = it->it_data; int rc = 0; ENTRY; @@ -850,15 +787,15 @@ static int ll_create_it(struct inode *di dentry->d_name.name, dir->i_ino, dir->i_generation, dir, LL_IT2STR(it)); - rc = ll_it_open_error(IT_OPEN_CREATE, it); + rc = ll_it_open_error(DISP_OPEN_CREATE, it); if (rc) { - ptlrpc_req_finished(it->it_data); + ptlrpc_req_finished(request); RETURN(rc); } + mdc_store_inode_generation(request, 2, 1); inode = ll_create_node(dir, dentry->d_name.name, dentry->d_name.len, NULL, 0, mode, 0, it); - if (IS_ERR(inode)) { RETURN(PTR_ERR(inode)); } @@ -895,10 +832,13 @@ static int ll_mknod_raw(struct nameidata mode &= ~current->fs->umask; switch (mode & S_IFMT) { - case 0: case S_IFREG: + case 0: + case S_IFREG: mode |= S_IFREG; /* for mode = 0 case, fallthrough */ - case S_IFCHR: case S_IFBLK: - case S_IFIFO: case S_IFSOCK: + case S_IFCHR: + case S_IFBLK: + case S_IFIFO: + case S_IFSOCK: ll_prepare_mdc_op_data(&op_data, dir, NULL, name, len, 0); err = mdc_create(&sbi->ll_mdc_conn, &op_data, NULL, 0, mode, current->fsuid, current->fsgid, time, Index: super.c =================================================================== RCS file: /cvsroot/lustre/lustre/llite/super.c,v retrieving revision 1.135.2.44.2.6 retrieving revision 1.135.2.44.2.7 diff -u -w -b -B -p -r1.135.2.44.2.6 -r1.135.2.44.2.7 --- super.c 11 Jul 2003 10:19:55 -0000 1.135.2.44.2.6 +++ super.c 13 Jul 2003 00:32:10 -0000 1.135.2.44.2.7 @@ -49,14 +49,6 @@ static struct super_block *ll_read_super RETURN(sb); } -void dump_lsm(int level, struct lov_stripe_md *lsm) -{ - CDEBUG(level, "objid "LPX64", maxbytes "LPX64", magic %#08x, " - "stripe_size %#08x, offset %u, stripe_count %u\n", - lsm->lsm_object_id, lsm->lsm_maxbytes, lsm->lsm_magic, - lsm->lsm_stripe_size, lsm->lsm_stripe_offset, - lsm->lsm_stripe_count); -} /* exported operations */ struct super_operations ll_super_operations = |
From: Mike S. <sh...@us...> - 2003-07-13 00:32:15
|
Update of /cvsroot/lustre/lustre/kernel_patches/pc In directory sc8-pr-cvs1:/tmp/cvs-serv7083/kernel_patches/pc Added Files: Tag: b_unify ext3_delete_thread_2.4.20_chaos.pc invalidate_show_2.4.20_chaos.pc tcp_zero_copy_2.4.20_chaos.pc vfs_intent_2.4.20_chaos.pc Log Message: merge b_intent into b_unify, now that we know it passes --- NEW FILE --- fs/ext3/super.c fs/ext3/inode.c fs/ext3/file.c include/linux/ext3_fs.h include/linux/ext3_fs_sb.h --- NEW FILE --- fs/inode.c fs/super.c include/linux/fs.h fs/smbfs/inode.c --- NEW FILE --- include/linux/skbuff.h include/net/tcp.h net/netsyms.c net/core/skbuff.c net/ipv4/tcp.c --- NEW FILE --- fs/exec.c fs/dcache.c fs/namespace.c fs/namei.c fs/nfsd/vfs.c fs/open.c fs/stat.c fs/proc/base.c include/linux/dcache.h include/linux/fs.h include/linux/fs_struct.h kernel/ksyms.c kernel/fork.c kernel/exit.c |
From: Mike S. <sh...@us...> - 2003-07-13 00:32:15
|
Update of /cvsroot/lustre/lustre/kernel_patches/series In directory sc8-pr-cvs1:/tmp/cvs-serv7083/kernel_patches/series Added Files: Tag: b_unify chaos-2.4.20 Log Message: merge b_intent into b_unify, now that we know it passes --- NEW FILE --- dev_read_only_2.4.20-rh.patch exports_2.4.20-rh-hp.patch kmem_cache_validate_2.4.20-rh.patch lustre_version.patch vfs_intent_2.4.20_chaos.patch invalidate_show_2.4.20_chaos.patch iod-rmap-exports-2.4.20.patch export-truncate.patch ext-2.4-patch-1-chaos.patch ext-2.4-patch-2.patch ext-2.4-patch-3.patch ext-2.4-patch-4.patch linux-2.4.20-xattr-0.8.54-chaos.patch ext3-2.4.20-fixes.patch ext3_orphan_lock-2.4.20-rh.patch ext3_delete_thread_2.4.20_chaos.patch ext3-noread-2.4.20.patch extN-wantedi.patch ext3-san-2.4.20.patch iopen-2.4.20.patch tcp_zero_copy_2.4.20_chaos.patch |