* [PATCH 0/2] Drivers: hv: Miscellaneous fixes @ 2017-06-25 19:47 kys 2017-06-25 19:47 ` [PATCH 1/2] Tools: hv: vss: Skip freezing filesystems backed by loop kys 2017-06-25 19:47 ` [PATCH 2/2] vmbus: re-enable channel tasklet kys 0 siblings, 2 replies; 5+ messages in thread From: kys @ 2017-06-25 19:47 UTC (permalink / raw) To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang, leann.ogasawara, marcelo.cerri, sthemmin Cc: K. Y. Srinivasan From: K. Y. Srinivasan <kys@microsoft.com> Miscellaneous fixes. Alex Ng (1): Tools: hv: vss: Skip freezing filesystems backed by loop Stephen Hemminger (1): vmbus: re-enable channel tasklet drivers/hv/channel.c | 2 ++ tools/hv/hv_vss_daemon.c | 7 +++++++ 2 files changed, 9 insertions(+), 0 deletions(-) ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] Tools: hv: vss: Skip freezing filesystems backed by loop 2017-06-25 19:47 [PATCH 0/2] Drivers: hv: Miscellaneous fixes kys @ 2017-06-25 19:47 ` kys 2017-07-17 13:00 ` Greg KH 2017-06-25 19:47 ` [PATCH 2/2] vmbus: re-enable channel tasklet kys 1 sibling, 1 reply; 5+ messages in thread From: kys @ 2017-06-25 19:47 UTC (permalink / raw) To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang, leann.ogasawara, marcelo.cerri, sthemmin Cc: Alex Ng, Vyronas Tsingaras, K. Y. Srinivasan From: Alex Ng <alexng@messages.microsoft.com> Skip loop devices from the freeze/thaw operation. Signed-off-by: Alex Ng <alexng@messages.microsoft.com> Signed-off-by: Vyronas Tsingaras <vyronas@vtsingaras.me> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> --- tools/hv/hv_vss_daemon.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/tools/hv/hv_vss_daemon.c b/tools/hv/hv_vss_daemon.c index 7ba5419..b2b4ebf 100644 --- a/tools/hv/hv_vss_daemon.c +++ b/tools/hv/hv_vss_daemon.c @@ -21,6 +21,7 @@ #include <sys/types.h> #include <sys/poll.h> #include <sys/ioctl.h> +#include <sys/stat.h> #include <fcntl.h> #include <stdio.h> #include <mntent.h> @@ -30,6 +31,7 @@ #include <ctype.h> #include <errno.h> #include <linux/fs.h> +#include <linux/major.h> #include <linux/hyperv.h> #include <syslog.h> #include <getopt.h> @@ -70,6 +72,7 @@ static int vss_operate(int operation) char match[] = "/dev/"; FILE *mounts; struct mntent *ent; + struct stat sb; char errdir[1024] = {0}; unsigned int cmd; int error = 0, root_seen = 0, save_errno = 0; @@ -92,6 +95,10 @@ static int vss_operate(int operation) while ((ent = getmntent(mounts))) { if (strncmp(ent->mnt_fsname, match, strlen(match))) continue; + if (stat(ent->mnt_fsname, &sb) == -1) + continue; + if (S_ISBLK(sb.st_mode) && major(sb.st_rdev) == LOOP_MAJOR) + continue; if (hasmntopt(ent, MNTOPT_RO) != NULL) continue; if (strcmp(ent->mnt_type, "vfat") == 0) -- 1.7.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Tools: hv: vss: Skip freezing filesystems backed by loop 2017-06-25 19:47 ` [PATCH 1/2] Tools: hv: vss: Skip freezing filesystems backed by loop kys @ 2017-07-17 13:00 ` Greg KH 2017-07-17 18:59 ` Alex Ng (LIS) 0 siblings, 1 reply; 5+ messages in thread From: Greg KH @ 2017-07-17 13:00 UTC (permalink / raw) To: kys Cc: linux-kernel, devel, olaf, apw, vkuznets, jasowang, leann.ogasawara, marcelo.cerri, sthemmin, Alex Ng, Vyronas Tsingaras On Sun, Jun 25, 2017 at 12:47:45PM -0700, kys@exchange.microsoft.com wrote: > From: Alex Ng <alexng@messages.microsoft.com> > > Skip loop devices from the freeze/thaw operation. Ok, but why? What is the consequences of this? Please provide a much better changelog comment, especially for something that is supposed to be a "fix". thanks, greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH 1/2] Tools: hv: vss: Skip freezing filesystems backed by loop 2017-07-17 13:00 ` Greg KH @ 2017-07-17 18:59 ` Alex Ng (LIS) 0 siblings, 0 replies; 5+ messages in thread From: Alex Ng (LIS) @ 2017-07-17 18:59 UTC (permalink / raw) To: Greg KH, KY Srinivasan Cc: linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com, jasowang@redhat.com, leann.ogasawara@canonical.com, marcelo.cerri@canonical.com, Stephen Hemminger, Vyronas Tsingaras My apologies. The changelog comment should be more descriptive. Since a loop device is backed by a file, a backup will already result in its parent filesystem being frozen. It's sufficient to just freeze the parent filesystem, so we can skip the loop device. This avoids a situation where a loop device and its parent filesystem are both frozen and then thawed out of order. For example, if the loop device is enumerated first, we would thaw it while its parent filesystem is still frozen. The thaw operation fails and the loop device remains frozen. I'll work with KY to send an updated patch with a better comment. > -----Original Message----- > From: Greg KH [mailto:gregkh@linuxfoundation.org] > Sent: Monday, July 17, 2017 6:00 AM > To: KY Srinivasan <kys@microsoft.com> > Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org; > olaf@aepfle.de; apw@canonical.com; vkuznets@redhat.com; > jasowang@redhat.com; leann.ogasawara@canonical.com; > marcelo.cerri@canonical.com; Stephen Hemminger > <sthemmin@microsoft.com>; Alex Ng (LIS) <alexng@microsoft.com>; > Vyronas Tsingaras <vyronas@vtsingaras.me> > Subject: Re: [PATCH 1/2] Tools: hv: vss: Skip freezing filesystems backed by > loop > > On Sun, Jun 25, 2017 at 12:47:45PM -0700, kys@exchange.microsoft.com > wrote: > > From: Alex Ng <alexng@messages.microsoft.com> > > > > Skip loop devices from the freeze/thaw operation. > > Ok, but why? What is the consequences of this? Please provide a much > better changelog comment, especially for something that is supposed to > be a "fix". > > thanks, > > greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] vmbus: re-enable channel tasklet 2017-06-25 19:47 [PATCH 0/2] Drivers: hv: Miscellaneous fixes kys 2017-06-25 19:47 ` [PATCH 1/2] Tools: hv: vss: Skip freezing filesystems backed by loop kys @ 2017-06-25 19:47 ` kys 1 sibling, 0 replies; 5+ messages in thread From: kys @ 2017-06-25 19:47 UTC (permalink / raw) To: gregkh, linux-kernel, devel, olaf, apw, vkuznets, jasowang, leann.ogasawara, marcelo.cerri, sthemmin Cc: Stephen Hemminger, K. Y. Srinivasan, stable From: Stephen Hemminger <stephen@networkplumber.org> This problem shows up in 4.11 when netvsc driver is removed and reloaded. The problem is that the channel is closed during module removal and the tasklet for processing responses is disabled. When module is reloaded the channel is reopened but the tasklet is marked as disabled. The fix is to re-enable tasklet at the end of close which gets it back to the initial state. The issue is less urgent in 4.12 since network driver now uses NAPI and not the tasklet; and other VMBUS devices are rarely unloaded/reloaded. Fixes: dad72a1d2844 ("vmbus: remove hv_event_tasklet_disable/enable") Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Cc: stable@vger.kernel.org --- drivers/hv/channel.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index e9bf0bb..e57cc40 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@ -606,6 +606,8 @@ static int vmbus_close_internal(struct vmbus_channel *channel) get_order(channel->ringbuffer_pagecount * PAGE_SIZE)); out: + /* re-enable tasklet for use on re-open */ + tasklet_enable(&channel->callback_event); return ret; } -- 1.7.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-07-17 18:59 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-06-25 19:47 [PATCH 0/2] Drivers: hv: Miscellaneous fixes kys 2017-06-25 19:47 ` [PATCH 1/2] Tools: hv: vss: Skip freezing filesystems backed by loop kys 2017-07-17 13:00 ` Greg KH 2017-07-17 18:59 ` Alex Ng (LIS) 2017-06-25 19:47 ` [PATCH 2/2] vmbus: re-enable channel tasklet kys
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox