Hi Lars,

On Mon, Feb 20, 2012 at 09:40:22PM +0100, Lars Ellenberg wrote:
> What do you say?

Yes, please go ahead and apply this.

Cheers,

Dejan

> 
> commit e57f9f7a7b8f838e750864ce332436a0f36321d7
> Author: Lars Ellenberg <lars.ellenb...@linbit.com>
> Date:   Mon Feb 20 20:38:49 2012 +0100
> 
>     Medium: Filesystem: improve read/write checks for CHECK_LEVEL 10, 20
>     
>     Some devices don't support 512 byte direct writes anymore,
>     the "physical" block size is 4kByte.
>     
>     Changing "bs=512 count=16" to "bs=4k count=1" also helps to avoid
>     spurious timeouts.  I've seen badly tuned (and/or totally overloaded) IO
>     stacks exposing a synchronous single-request IO latency of many seconds
>     (under load).  If we need 16 of those, we can easily violate timeout
>     settings.
> 
> diff --git a/heartbeat/Filesystem b/heartbeat/Filesystem
> index a31931b..5f1ecfe 100755
> --- a/heartbeat/Filesystem
> +++ b/heartbeat/Filesystem
> @@ -837,7 +837,7 @@ Filesystem_monitor_10()
>               ocf_log warn "$DEVICE is not a block device, monitor 10 is noop"
>               return $OCF_SUCCESS
>       fi
> -     dd_opts="iflag=direct bs=512 count=16"
> +     dd_opts="iflag=direct bs=4k count=1"
>       err_output=`dd if=$DEVICE $dd_opts 2>&1 >/dev/null`
>       if [ $? -ne 0 ]; then
>               ocf_log err "Failed to read device $DEVICE"
> @@ -853,11 +853,11 @@ Filesystem_monitor_20()
>  {
>       if [ "$blockdevice" = "no" ] ; then
>               # O_DIRECT not supported on cifs/smbfs
> -             dd_opts="oflag=sync bs=512 conv=fsync,sync"
> +             dd_opts="oflag=sync bs=4k conv=fsync,sync"
>       else
>               # Writing to the device in O_DIRECT mode is imperative
>               # to bypass caches.
> -             dd_opts="oflag=direct,sync bs=512 conv=fsync,sync"
> +             dd_opts="oflag=direct,sync bs=4k conv=fsync,sync"
>       fi
>       status_dir=`dirname $STATUSFILE`
>       [ -d "$status_dir" ] ||
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to