Bugzilla : 12948
Description: buffer overruns could theoretically occur
Details : llapi_semantic_traverse() modifies the "path" argument by
- appending values to the end of the origin string, and a buffer
+ appending values to the end of the origin string, and a buffer
overrun may occur. Adding buffer overrun check in liblustreapi.
Severity : normal
Bugzilla : 13452
Description: Kernel config for 2.6.18-vanilla.
Details : Modify targets/2.6-vanilla.target.in.
- Add config file kernel-2.6.18-2.6-vanilla-i686.config.
- Add config file kernel-2.6.18-2.6-vanilla-i686-smp.config.
- Add config file kernel-2.6.18-2.6-vanilla-x86_64.config.
- Add config file kernel-2.6.18-2.6-vanilla-x86_64-smp.config.
+ Add config file kernel-2.6.18-2.6-vanilla-i686.config.
+ Add config file kernel-2.6.18-2.6-vanilla-i686-smp.config.
+ Add config file kernel-2.6.18-2.6-vanilla-x86_64.config.
+ Add config file kernel-2.6.18-2.6-vanilla-x86_64-smp.config.
Severity : major
Bugzilla : 11710
Description: enable data checksumming by default
Details : enable checksum by default, allow --disable-checksum
configure option and "-o nochecksum" mount option. Checksums
- can also be disabled at runtime via $LPROC/llite/*/checksum_pages.
+ can also be disabled at runtime via $LPROC/osc/*/checksum_pages.
Severity : normal
Frequency : Occasionally with failover
/* flags for sbi->ll_flags */
#define LL_SBI_NOLCK 0x01 /* DLM locking disabled (directio-only) */
-#define LL_SBI_CHECKSUM 0x02 /* checksum each page as it's written */
+#define LL_SBI_DATA_CHECKSUM 0x02 /* checksum each page on the wire */
#define LL_SBI_FLOCK 0x04
#define LL_SBI_USER_XATTR 0x08 /* support user xattr */
#define LL_SBI_ACL 0x10 /* support ACL */
#define LL_SBI_JOIN 0x20 /* support JOIN */
#define LL_SBI_LOCALFLOCK 0x40 /* Local flocks support by kernel */
#define LL_SBI_LRU_RESIZE 0x80 /* support lru resize */
+#define LL_SBI_LLITE_CHECKSUM 0x100 /* checksum each page in memory */
/* default value for ll_sb_info->contention_time */
#define SBI_DEFAULT_CONTENTION_SECONDS 60
list_add_tail(&sbi->ll_list, &ll_super_blocks);
spin_unlock(&ll_sb_lock);
+#ifdef ENABLE_CHECKSUM
+ sbi->ll_flags |= LL_SBI_DATA_CHECKSUM;
+#endif
#ifdef ENABLE_LLITE_CHECKSUM
- sbi->ll_flags |= LL_SBI_CHECKSUM;
+ sbi->ll_flags |= LL_SBI_LLITE_CHECKSUM;
#endif
#ifdef HAVE_LRU_RESIZE_SUPPORT
GOTO(out_root, err);
}
- checksum = sbi->ll_flags & LL_SBI_CHECKSUM;
- err = obd_set_info_async(sbi->ll_osc_exp, strlen("checksum"),"checksum",
- sizeof(checksum), &checksum, NULL);
+ checksum = sbi->ll_flags & LL_SBI_DATA_CHECKSUM;
+ err = obd_set_info_async(sbi->ll_osc_exp, strlen("checksum"),
+ "checksum", sizeof(checksum),
+ &checksum, NULL);
/* making vm readahead 0 for 2.4.x. In the case of 2.6.x,
backing dev info assigned to inode mapping is used for
goto next;
}
- tmp = ll_set_opt("checksum", s1, LL_SBI_CHECKSUM);
+ tmp = ll_set_opt("checksum", s1, LL_SBI_DATA_CHECKSUM);
if (tmp) {
*flags |= tmp;
goto next;
}
- tmp = ll_set_opt("nochecksum", s1, LL_SBI_CHECKSUM);
+ tmp = ll_set_opt("nochecksum", s1, LL_SBI_DATA_CHECKSUM);
if (tmp) {
*flags &= ~tmp;
goto next;
struct ll_sb_info *sbi = ll_s2sbi(sb);
return snprintf(page, count, "%u\n",
- (sbi->ll_flags & LL_SBI_CHECKSUM) ? 1 : 0);
+ (sbi->ll_flags & LL_SBI_LLITE_CHECKSUM) ? 1 : 0);
}
static int ll_wr_checksum(struct file *file, const char *buffer,
if (rc)
return rc;
if (val)
- sbi->ll_flags |= LL_SBI_CHECKSUM;
+ sbi->ll_flags |= (LL_SBI_LLITE_CHECKSUM|LL_SBI_DATA_CHECKSUM);
else
- sbi->ll_flags &= ~LL_SBI_CHECKSUM;
+ sbi->ll_flags &= ~(LL_SBI_LLITE_CHECKSUM|LL_SBI_DATA_CHECKSUM);
rc = obd_set_info_async(sbi->ll_osc_exp, strlen("checksum"), "checksum",
sizeof(val), &val, NULL);
export ORIG_CSUM=""
set_checksums()
{
- [ "$ORIG_CSUM" ]||ORIG_CSUM=`cat $LPROC/llite/*/checksum_pages|head -n1`
- for f in $LPROC/llite/*/checksum_pages; do
+ [ "$ORIG_CSUM" ] || ORIG_CSUM=`cat $LPROC/osc/*/checksums | head -n1`
+ for f in $LPROC/osc/*/checksums; do
echo $1 >> $f
done
[ -z "`grep early_lock_cancel $LPROC/mdc/*/connect_flags`" ] && \
skip "no early lock cancel on server" && return 9
lru_resize_disable
- mkdir $DIR/$tdir
+ mkdir -p $DIR/$tdir
cancel_lru_locks mdc
stat $DIR/$tdir > /dev/null
can1=`awk '/ldlm_cancel/ {print $2}' $LPROC/ldlm/services/ldlm_canceld/stats`
blk1=`awk '/ldlm_bl_callback/ {print $2}' $LPROC/ldlm/services/ldlm_cbd/stats`
- mkdir $DIR/$tdir/d1
+ mkdir -p $DIR/$tdir/d1
can2=`awk '/ldlm_cancel/ {print $2}' $LPROC/ldlm/services/ldlm_canceld/stats`
blk2=`awk '/ldlm_bl_callback/ {print $2}' $LPROC/ldlm/services/ldlm_cbd/stats`
[ $can1 -eq $can2 ] || error $((can2-can1)) "cancel RPC occured."
[ -z "`grep early_lock_cancel $LPROC/mdc/*/connect_flags`" ] && \
skip "no early lock cancel on server" && return 9
lru_resize_disable
- mkdir $DIR/$tdir
+ mkdir -p $DIR/$tdir
cancel_lru_locks mdc
stat $DIR/$tdir > /dev/null
can1=`awk '/ldlm_cancel/ {print $2}' $LPROC/ldlm/services/ldlm_canceld/stats`
[ -z "`grep early_lock_cancel $LPROC/mdc/*/connect_flags`" ] && \
skip "no early lock cancel on server" && return 9
lru_resize_disable
- mkdir $DIR/$tdir
+ mkdir -p $DIR/$tdir
dd if=/dev/zero of=$DIR/$tdir/f1 count=1
cancel_lru_locks mdc
cancel_lru_locks osc
skip "no lru resize on server" && return 0
cancel_lru_locks mdc
lru_resize_enable
- NSDIR=`find $LPROC/ldlm/namespaces | grep mdc | head -1`
+ NSDIR=`find $LPROC/ldlm/namespaces | grep -i mdc | head -1`
# we want to test main pool functionality, that is cancel based on SLV
# this is why shrinkers are disabled
skip "no lru resize on server" && return 0
cleanup -f || error "failed to unmount"
MOUNTOPT="$MOUNTOPT,nolruresize"
- setup
+ setup || error "setup failed"
NR=3000
mkdir -p $DIR/$tdir || error "failed to create $DIR/$tdir"
cleanup -f || error "failed to unmount"
MOUNTOPT=`echo $MOUNTOPT | sed "s/nolruresize/lruresize/"`
- setup
+ setup || error "setup failed"
createmany -o $DIR/$tdir/f $NR
log "doing ls -la $DIR/$tdir 3 times (lru resize enabled)"