From: adilger Date: Thu, 12 Feb 2004 08:54:33 +0000 (+0000) Subject: Update b_eq from HEAD (20040212_0003). (b_smallfix mostly) X-Git-Tag: v1_7_100~1^248~36 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=674ae929664a9d7560ba980d2d7304275a247a91;p=fs%2Flustre-release.git Update b_eq from HEAD (20040212_0003). (b_smallfix mostly) --- diff --git a/lustre/kernel_patches/patches/ext3-truncate-buffer-head.patch b/lustre/kernel_patches/patches/ext3-truncate-buffer-head.patch index f6be984..3741213 100644 --- a/lustre/kernel_patches/patches/ext3-truncate-buffer-head.patch +++ b/lustre/kernel_patches/patches/ext3-truncate-buffer-head.patch @@ -4,7 +4,7 @@ if (ext3_should_order_data(inode)) err = ext3_journal_dirty_data(handle, bh, 0); __mark_buffer_dirty(bh); -+ buffer_insert_inode_data_queue(bh, inode); ++ buffer_insert_inode_data_queue(bh, inode); } unlock: diff --git a/lustre/scripts/merge1.sh b/lustre/scripts/merge1.sh index 362ddd4..d7e0069 100755 --- a/lustre/scripts/merge1.sh +++ b/lustre/scripts/merge1.sh @@ -1,5 +1,6 @@ #!/bin/sh -e +CONFLICTS=cvs-merge-conflicts CVS=cvs if [ -f .mergeinfo ] ; then @@ -7,8 +8,8 @@ if [ -f .mergeinfo ] ; then exit fi -if [ -f merge-conflicts ] ; then - echo "cvs-merge-conflicts exists - clean up first" +if [ -f $CONFLICTS ] ; then + echo "$CONFLICTS exists - clean up first" exit fi @@ -18,17 +19,26 @@ if [ $# != 2 ]; then fi parent=$1 -PARENT=`echo $parent | tr '[a-z]' '[A-Z]'` +PARENT=`echo $parent | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"` child=$2 -CHILD=`echo $child | tr '[a-z]' '[A-Z]'` +CHILD=`echo $child | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"` date=`date +%Y%m%d_%H%M` module=lustre -if [ $parent != "HEAD" ]; then - parent="b_$parent" -fi -if [ $child != "HEAD" ]; then - child="b_$child" +case $parent in + HEAD) : ;; + b_*|b1*) : ;; + *) parent="b_$parent" ;; +esac +case $child in + HEAD) : ;; + b_*|b1*) : ;; + *) child="b_$child" +esac + +if [ "$child" != "HEAD" -a "`cat CVS/Tag`" != "T$child" ]; then + echo "This script must be run within the $child branch" + exit 1 fi cat << EOF > .mergeinfo @@ -38,24 +48,26 @@ child=$child CHILD=$CHILD date=$date module=$module +CONFLICTS=$CONFLICTS EOF -echo PARENT $PARENT parent $parent CHILD $CHILD child $child date $date +echo PARENT: $PARENT parent: $parent CHILD: $CHILD child: $child date: $date -echo -n "tagging $parent as ${PARENT}_${CHILD}_UPDATE_PARENT_$date ...." +echo -n "tagging $parent as '${PARENT}_${CHILD}_UPDATE_PARENT_$date' ...." $CVS rtag -r $parent ${PARENT}_${CHILD}_UPDATE_PARENT_$date $module echo "done" -echo -n "tagging $child as ${PARENT}_${CHILD}_UPDATE_CHILD_$date ...." +echo -n "tagging $child as '${PARENT}_${CHILD}_UPDATE_CHILD_$date' ...." $CVS rtag -r $child ${PARENT}_${CHILD}_UPDATE_CHILD_$date $module echo "done" echo "Updating: -j ${CHILD}_BASE -j ${PARENT}_${CHILD}_UPDATE_PARENT_$date ...." $CVS update -j ${CHILD}_BASE -j ${PARENT}_${CHILD}_UPDATE_PARENT_$date -dP echo "done" -echo -n "Recording conflicts in cvs-merge-conflicts ..." -if $CVS update | grep '^C' > cvs-merge-conflicts; then +echo -n "Recording conflicts in $CONFLICTS ..." +if $CVS update | grep '^C' > $CONFLICTS; then echo "Conflicts found, fix before committing." - cat cvs-merge-conflicts + cat $CONFLICTS else echo "No conflicts found" + rm -f $CONFLICTS fi echo "Test, commit and then run merge2.sh (no arguments)" diff --git a/lustre/scripts/merge2.sh b/lustre/scripts/merge2.sh index e6ba077..43586f0 100755 --- a/lustre/scripts/merge2.sh +++ b/lustre/scripts/merge2.sh @@ -7,6 +7,14 @@ fi . .mergeinfo +if [ -f $CONFLICTS ] ; then + echo "$CONFLICTS exists - clean up first" + cat $CONFLICTS + exit +fi + +cvs update $dir 2>&1 | grep "^M" && echo "uncommitted changes" && exit 1 + echo -n "Tagging ${PARENT}_${CHILD}_UPDATE_PARENT_$date as ${CHILD}_BASE_$date ..." cvs rtag -r ${PARENT}_${CHILD}_UPDATE_PARENT_$date ${CHILD}_BASE_$date $module echo "done" diff --git a/lustre/smfs/symlink.c b/lustre/smfs/symlink.c index 72c68f4..f590852 100644 --- a/lustre/smfs/symlink.c +++ b/lustre/smfs/symlink.c @@ -16,28 +16,47 @@ static int smfs_readlink(struct dentry * dentry, char * buffer, int buflen) { struct inode *cache_inode = I2CI(dentry->d_inode); - int rc = 0; + struct dentry cache_dentry; + int rc = 0; + if (!cache_inode) + RETURN(-ENOENT); + + smfs_prepare_dentry(&cache_dentry, NULL, &dentry->d_name); + d_add(&cache_dentry, cache_inode); + if (cache_inode->i_op && cache_inode->i_op->readlink) - rc = cache_inode->i_op->readlink(dentry, buffer, buflen); + rc = cache_inode->i_op->readlink(&cache_dentry, buffer, buflen); + smfs_clear_dentry(&cache_dentry); return rc; } static int smfs_follow_link(struct dentry *dentry, struct nameidata *nd) { struct inode *cache_inode = I2CI(dentry->d_inode); + struct dentry cache_dentry; int rc = 0; + if (!cache_inode) + RETURN(-ENOENT); + + smfs_prepare_dentry(&cache_dentry, NULL, &dentry->d_name); + d_add(&cache_dentry, cache_inode); if (cache_inode->i_op && cache_inode->i_op->follow_link) - rc = cache_inode->i_op->follow_link(dentry, nd); + rc = cache_inode->i_op->follow_link(&cache_dentry, nd); + smfs_clear_dentry(&cache_dentry); return rc; } struct inode_operations smfs_sym_iops = { readlink: smfs_readlink, follow_link: smfs_follow_link, + setxattr: smfs_setxattr, /* BKL held */ + getxattr: smfs_getxattr, /* BKL held */ + listxattr: smfs_listxattr, /* BKL held */ + removexattr: smfs_removexattr, /* BKL held */ }; struct file_operations smfs_sym_fops = {