From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Date: Mon, 24 Feb 2020 13:57:43 -0800 Subject: [Ocfs2-devel] [PATCH v7 14/24] btrfs: Convert from readpages to readahead In-Reply-To: <20200224215414.GR24185@bombadil.infradead.org> References: <20200219210103.32400-1-willy@infradead.org> <20200219210103.32400-15-willy@infradead.org> <20200220134849.GV24185@bombadil.infradead.org> <20200220154658.GA19577@infradead.org> <20200220155452.GX24185@bombadil.infradead.org> <20200220155727.GA32232@infradead.org> <20200224214347.GH13895@infradead.org> <20200224215414.GR24185@bombadil.infradead.org> Message-ID: <20200224215743.GA24044@infradead.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Matthew Wilcox Cc: Christoph Hellwig , Johannes Thumshirn , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "linux-btrfs@vger.kernel.org" , "linux-erofs@lists.ozlabs.org" , "linux-ext4@vger.kernel.org" , "linux-f2fs-devel@lists.sourceforge.net" , "cluster-devel@redhat.com" , "ocfs2-devel@oss.oracle.com" , "linux-xfs@vger.kernel.org" On Mon, Feb 24, 2020 at 01:54:14PM -0800, Matthew Wilcox wrote: > > First I think the implicit ARRAY_SIZE in readahead_page_batch is highly > > dangerous, as it will do the wrong thing when passing a pointer or > > function argument. > > somebody already thought of that ;-) > > #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) Ok. Still find it pretty weird to design a primary interface that just works with an array type.