From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Grover Subject: Re: [PATCH] dm-delay: Add a message to change delay Date: Mon, 31 Aug 2015 22:02:33 -0700 Message-ID: <55E53169.1030105@redhat.com> References: <1441056276-14288-1-git-send-email-agrover@redhat.com> <20150901020557.GA31620@redhat.com> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150901020557.GA31620@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Vivek Goyal Cc: dm-devel@redhat.com List-Id: dm-devel.ids On 08/31/2015 07:05 PM, Vivek Goyal wrote: > On Mon, Aug 31, 2015 at 02:24:36PM -0700, Andy Grover wrote: >> This enables runtime modification of the read and write delay values. >> >> Make sure if the delay time is reduced to flush currently-delayed >> bios first, to maintain ordering. >> >> Signed-off-by: Andy Grover >> --- >> Documentation/device-mapper/delay.txt | 8 +++++++ >> drivers/md/dm-delay.c | 42 +++++++++++++++++++++++++++++++++++ >> 2 files changed, 50 insertions(+) >> >> diff --git a/Documentation/device-mapper/delay.txt b/Documentation/device-mapper/delay.txt >> index 15adc55..9e80751 100644 >> --- a/Documentation/device-mapper/delay.txt >> +++ b/Documentation/device-mapper/delay.txt >> @@ -10,6 +10,14 @@ Parameters: >> With separate write parameters, the first set is only used for reads. >> Delays are specified in milliseconds. >> >> +Message Interface >> +----------------- >> +The delay target will accept a message of the following format: >> + >> +set_delay [] >> + > > Hi Andy, > > So if I want to change only write_delay and keep read_delay same, how do > I do that. Do I have to keep track of existing delay values in user space > and pass same value in read_delay to achieve this. > > Thanks > Vivek Hi Vivek, Yes I suppose userspace would either need to remember read_delay so as to not change it while setting write_delay, or I guess it could read the existing values by getting table status before sending the message. Is this reasonable, or do you think it would be better to, say, have separate messages for setting the two values, or some other message style? Thanks -- Regards -- Andy