From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752212AbdIAPwF (ORCPT ); Fri, 1 Sep 2017 11:52:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43264 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752014AbdIAPwC (ORCPT ); Fri, 1 Sep 2017 11:52:02 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B0F9968AE Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=dhowells@redhat.com Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <150428045304.25051.1778333106306853298.stgit@warthog.procyon.org.uk> References: <150428045304.25051.1778333106306853298.stgit@warthog.procyon.org.uk> To: linux-afs@lists.infradead.org Cc: dhowells@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 00/11] AFS: Namespacing part 1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25547.1504281120.1@warthog.procyon.org.uk> Date: Fri, 01 Sep 2017 16:52:00 +0100 Message-ID: <25548.1504281120@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 01 Sep 2017 15:52:02 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Here are some changes to the AFS filesystem that form the first part of network-namespacing and IPv6 enabling the AFS filesystem. AF_RXRPC is already namespaced. This is built on AF_RXRPC changes tagged with rxrpc-next-20170829 (which is also in net-next). The AFS changes are: (1) Create a dummy AFS network namespace and shift a bunch of global things into it and start using it. (2) Add some more AFS RPC protocol definitions. (3) Update the cache infrastructure to remove some stuff that is redundant or not actually useful and increment the version. (4) Keep track of internal addresses in terms of sockaddr_rxrpc structs rather than in_addr structs. This will enable the use of IPv6. (5) Allow IPv6 addresses for VL servers to be specified. Note that this doesn't help with finding FS servers as that requires a protocol change. Such a protocol extension is available in the AuriStor AFS-compatible server, though I haven't implemented that yet. (6) Overhaul cell database management to manage them better, making them automatically kept up to date from the DNS server. (7) Make use of the new AF_RXRPC call-retry to implement address rotation for VL servers and FS servers without the need to re-encrypt client call data. To make this work, I've added some extensions to the core kernel: (1) Add a decrement-after-return function for workqueues that allows a work item to ask the workqueue manager to decrement an atomic_t and 'wake it up' if it reaches 0. This is analogous to complete_and_exit() and can be used to protect rmmod against code removal. (2) Add refcount_inc/dec_return() functions that return the new value of the refcount_t. This makes maintaining a cache easier where you want to schedule timed garbage collection when the refcount reaches 1. It also makes tracing easier as the value is obtained atomically. (3) Pass the wait mode to wait_on_atomic_t() and provide a default action function. This allows various default actions scattered about the place to be deleted. (4) Add a function to start or reduce the timeout on a timer if it's already running. This makes it easier to maintain a single timer for multiple events without requiring extra locking to check/modify the timer (the timer has its own lock after all). The patches can be found here also: http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=afs David