From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752955Ab1GZBJl (ORCPT ); Mon, 25 Jul 2011 21:09:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60747 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752219Ab1GZBJf (ORCPT ); Mon, 25 Jul 2011 21:09:35 -0400 Message-ID: <4E2E13BE.7000909@redhat.com> Date: Mon, 25 Jul 2011 18:09:18 -0700 From: Andy Grover Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Red Hat/3.1.11-2.el6_1 Lightning/1.0b3pre Thunderbird/3.1.11 MIME-Version: 1.0 To: "Nicholas A. Bellinger" CC: Andrew Morton , Linus Torvalds , target-devel , linux-scsi , LKML , Christoph Hellwig , Hannes Reinecke , Roland Dreier , James Bottomley , Boaz Harrosh , Mike Christie Subject: Re: [GIT PULL] iscsi-target merge for v3.1-rc1 References: <1311462975.31450.356.camel@haakon2.linux-iscsi.org> <20110725163739.5c19b04d.akpm@linux-foundation.org> <1311640376.17766.221.camel@haakon2.linux-iscsi.org> In-Reply-To: <1311640376.17766.221.camel@haakon2.linux-iscsi.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/25/2011 05:32 PM, Nicholas A. Bellinger wrote: > On Mon, 2011-07-25 at 16:37 -0700, Andrew Morton wrote: >> On Sat, 23 Jul 2011 16:16:15 -0700 >> "Nicholas A. Bellinger" wrote: >> >>> Please go ahead and pull from: >>> >>> master.kernel.org:/pub/scm/linux/kernel/git/nab/target-pending.git for-linus-merge >> >> i386 allyesconfig: >> >> ERROR: "__udivdi3" [drivers/target/target_core_mod.ko] undefined! >> >> somewhere in drivers/target/target_core_transport.c:transport_allocate_data_tasks(). > > Mmmm, I was under the assumption that DIV_ROUND_UP() did unsigned long > long division correctly for sector_t on 32-bit , but apparently not with > the new v4.1 transport_allocate_data_tasks() code.. Andy..? sectors = DIV_ROUND_UP(cmd->data_length, sector_size); task_count = DIV_ROUND_UP(sectors, dev_max_sectors); sectors is a sector_t but the value will never be >32bits, since data_length is u32. We could just cast sectors to a u32 and be ok for this particular usage... DIV_ROUND_UP handling 64bit would of course also resolve the issue nicely. Regards -- Andy