Re: [PATCHv9] UBI: new module ubiblk: block layer on top of UBI

2011-10-01 Thread Artem Bityutskiy
* the time we access dev->gd -*/ mutex_lock(&devlist_lock); dev = find_dev(vi); if (!dev) { @@ -482,10 +463,9 @@ static int ubiblk_resize(struct ubi_volume_info *vi) mutex_lock(&dev->vol_lock); disk_capacity = (vi->size * vi->usable_leb_size) >> 9; set_capacity(dev->gd, disk_capacity); - dev_dbg(disk_to_dev(dev->gd), "resized to %d LEBs\n", vi->size); mutex_unlock(&dev->vol_lock); - mutex_unlock(&devlist_lock); + return 0; } -- Best Regards, Artem Bityutskiy -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCHv8] UBI: new module ubiblk: block layer on top of UBI

2011-09-26 Thread Artem Bityutskiy
ge the documentation. It should describe what this parameter is. Now I see that it requires volume ID. -- Best Regards, Artem Bityutskiy -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCHv7] UBI: new module ubiblk: block layer on top of UBI

2011-09-26 Thread Artem Bityutskiy
pen by number, if this fails, tries to treat this as a name and open by name. And AFAICS, you did not change the documentation for the "volume" module parameter. -- Best Regards, Artem Bityutskiy -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" i

Re: [PATCHv6] UBI: new module ubiblk: block layer on top of UBI

2011-09-23 Thread Artem Bityutskiy
should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > + * > + * Author: David Wagner > + * Some code taken from ubi-user.h Sinc

Re: [PATCHv5] UBI: new module ubiblk: block layer on top of UBI

2011-09-18 Thread Artem Bityutskiy
+ kthread_stop(dev->req_task); > + put_disk(dev->gd); > + > + kfree(dev->vi); > + list_del(&dev->list); /* really needed ? */ Good question, I think we should not have comments like this in the final driver. > +

Re: [PATCHv3] UBI: new module ubiblk: block layer on top of UBI

2011-09-11 Thread Artem Bityutskiy
things as well as with major issue related to race condigions: you should keep the UBI volume open as long as your block device is referenced, to prevent the UBI volume from being removed. -- Best Regards, Artem Bityutskiy -- To unsubscribe from this list: send the line "unsubscribe linu

Re: [PATCHv3] UBI: new module ubiblk: block layer on top of UBI

2011-09-09 Thread Artem Bityutskiy
On Fri, 2011-09-09 at 16:25 +0200, Arnd Bergmann wrote: > On Friday 09 September 2011, Artem Bityutskiy wrote: > > On Thu, 2011-09-08 at 17:26 +0200, Arnd Bergmann wrote: > > > On Tuesday 06 September 2011, Artem Bityutskiy wrote: > > > > Not sure about the bus appr

Re: [PATCHv3] UBI: new module ubiblk: block layer on top of UBI

2011-09-09 Thread Artem Bityutskiy
On Fri, 2011-09-09 at 14:53 +0300, Artem Bityutskiy wrote: > David, I am really busy and now, I suggest you to think about this. I'd > so far stick to the own ubiblk cdev approach, and would > analyse/prototype the approach of using UBI cdev for this. I provided > some concerns a

Re: [PATCHv3] UBI: new module ubiblk: block layer on top of UBI

2011-09-09 Thread Artem Bityutskiy
On Thu, 2011-09-08 at 17:26 +0200, Arnd Bergmann wrote: > On Tuesday 06 September 2011, Artem Bityutskiy wrote: > > Not sure about the bus approach - David, could you take a look at it > > please? If we can handle errors there - then we could indeed re-use the > > UBI control

Re: [PATCH] document ubiblk's usage of the same ioctl magic as a part of UBI

2011-09-05 Thread Artem Bityutskiy
sure that the underlying UBI volume does not disappear when you use it. -- Best Regards, Artem Bityutskiy -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCHv4] UBI: new module ubiblk: block layer on top of UBI

2011-09-05 Thread Artem Bityutskiy
r_volume_notifier(&ubiblk_notifier, 1); > + if (ret < 0) > + goto out_unreg_ctrl; > + > + pr_info("major=%d\n", ubiblk_major); Please, print something nicer, e.g., "control device major number is %d" > + > + return ret; > + &

Re: [PATCHv3] UBI: new module ubiblk: block layer on top of UBI

2011-09-05 Thread Artem Bityutskiy
On Tue, 2011-09-06 at 07:10 +0300, Artem Bityutskiy wrote: > On Tue, 2011-09-06 at 06:44 +0300, Artem Bityutskiy wrote: > > > It's not a dummy bus, in this approach it would be a the bus that gets > > > used by all ubiblk devices, which is a very common concept by itself

Re: [PATCHv3] UBI: new module ubiblk: block layer on top of UBI

2011-09-05 Thread Artem Bityutskiy
On Tue, 2011-09-06 at 06:44 +0300, Artem Bityutskiy wrote: > > It's not a dummy bus, in this approach it would be a the bus that gets > > used by all ubiblk devices, which is a very common concept by itself. > > It's more like the classic understanding of a 'dev

Re: [PATCHv3] UBI: new module ubiblk: block layer on top of UBI

2011-09-05 Thread Artem Bityutskiy
standing of a 'device class' that Greg > wants to see get replaced by bus_types in the kernel. Yes, this sounds OK. Although UBI already has notifiers, so we could just add 2 more events. -- Best Regards, Artem Bityutskiy -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCHv3] UBI: new module ubiblk: block layer on top of UBI

2011-08-25 Thread Artem Bityutskiy
device. This sounds better IMHO, but I am still not sure that adding another dummy bus and exposing it in sysfs and more complexity in the ubiblk code is more elegant and less wasteful than just creating a separate chardev... -- Best Regards, Artem Bityutskiy -- To unsubscribe from this list: s

Re: [PATCH] Tools for controling ubiblk

2011-08-22 Thread Artem Bityutskiy
copy the result of "make headers_install" invoked in the kernel tree. -- Best Regards, Artem Bityutskiy -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCHv3] UBI: new module ubiblk: block layer on top of UBI

2011-08-22 Thread Artem Bityutskiy
rnd when it comes to ioctl-related questions. P.S. Arnd, you can always find the initial post in lkml, if needed. -- Best Regards, Artem Bityutskiy -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCHv3] UBI: new module ubiblk: block layer on top of UBI

2011-08-22 Thread Artem Bityutskiy
e single message like "blah exited" at the end. [snip] > +/* Structure to be passed to UBIBLK_IOCADD or IOCDEL ioctl */ > +struct ubiblk_ctrl_req { > + __s32 ubi_num; > + __s32 vol_id; > +}; > + > +/* ioctl commands of the UBI control character device */ Please, document here that you share "O" with UBI. Also document this in UBI in a separate patch. > + > +#define UBIBLK_CTRL_IOC_MAGIC 'O' > + > +/* Create a ubiblk device from a UBI volume */ > +#define UBIBLK_IOCADD _IOW(UBIBLK_CTRL_IOC_MAGIC, 0x10, struct > ubiblk_ctrl_req) > +/* Delete a ubiblk device */ > +#define UBIBLK_IOCDEL _IOW(UBIBLK_CTRL_IOC_MAGIC, 0x11, struct > ubiblk_ctrl_req) > + > +#endif -- Best Regards, Artem Bityutskiy -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] UBI: new module ubiblk: block layer on top of UBI

2011-08-15 Thread Artem Bityutskiy
ubiattach / ubidetach). The other reason why I think this more complex approach is justified is that when / if you decide to add R/W support to ubiblk, you'd have troubles with the current approach (e.g., what if the UBI volume you are looking at is not ubiblk-formatted?) I think it should b

Re: [PATCH] UBI: new module ubiblk: block layer on top of UBI

2011-07-27 Thread Artem Bityutskiy
27;ll go through my e-mails and respond. Apologies again. -- Best Regards, Artem Bityutskiy (Битюцкий Артём) -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [RFC PATCHv2] UBI: new module ubiblk: block layer on top of UBI

2011-06-28 Thread Artem Bityutskiy
On Tue, 2011-06-28 at 17:24 +0200, david.wag...@free-electrons.com wrote: > + * Author: David Wagner > + * Some code taken from gluebi.c (Artem Bityutskiy (Битюцкий Артём), > + *Joern Engel) > + * Some code taken from mtd_blkdevs.c (David Woodho

Re: [PATCH 1/9] Squashfs: move zlib decompression wrapper code into a separate file

2009-12-09 Thread Artem Bityutskiy
have made named the functions squashfs_xxx, and removed the squashfs_ > when they were made static in the third patch. Did you consider using cryptoapi? UBIFS uses zlib/lzo in cryptoapi - it is a very clean way. -- Best Regards, Artem Bityutskiy (Артём Битюцкий) -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH, RFC] panic-note: Annotation from user space for panics

2009-11-18 Thread Artem Bityutskiy
On Tue, 2009-11-17 at 07:45 -0800, Eric W. Biederman wrote: > Artem Bityutskiy writes: > > > On Tue, 2009-11-17 at 13:45 +0100, Marco Stornelli wrote: > >> 2009/11/17 Artem Bityutskiy : > >> > Take a look at my mails where I describe different complications

Re: [PATCH, RFC] panic-note: Annotation from user space for panics

2009-11-17 Thread Artem Bityutskiy
On Tue, 2009-11-17 at 13:45 +0100, Marco Stornelli wrote: > 2009/11/17 Artem Bityutskiy : > > Take a look at my mails where I describe different complications we have > > in our system. We really want to have an OOPS/panic + our environment > > stuff to go together, at once.

Re: [PATCH, RFC] panic-note: Annotation from user space for panics

2009-11-17 Thread Artem Bityutskiy
ince you can't read past > + * the end. Writes can be done after the number of bytes in the > + * file, so this is the maximum possible file size, minus one. > + * > + * Returns the number of bytes to copy. > + */ > +static ssize_t read_write_size(size_t nby

Re: [PATCH, RFC] panic-note: Annotation from user space for panics

2009-11-17 Thread Artem Bityutskiy
s unnecessarily complex. This patch solves the problem gracefully, and I'd rather demand you to point what is the technical problem with the patches. -- Best Regards, Artem Bityutskiy (Артём Битюцкий) -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" i

Re: [PATCH, RFC] panic-note: Annotation from user space for panics

2009-11-13 Thread Artem Bityutskiy
On Fri, 2009-11-13 at 12:59 +0100, Simon Kagstrom wrote: > (Also fix David Woodhouses address and add Atal) > > On Fri, 13 Nov 2009 13:45:48 +0200 > Artem Bityutskiy wrote: > > > So we really need to print some user-space supplied information during > > the panic, an

Re: [PATCH, RFC] panic-note: Annotation from user space for panics

2009-11-13 Thread Artem Bityutskiy
n. So we really need to print some user-space supplied information during the panic, and then we store it on flash with mtdoops, and the later, when the device has network access we send whole bunch of oopses via the network. > One thing probably have to be fixed though: I don't think phra

Re: [PATCH, RFC] panic-note: Annotation from user space for panics

2009-11-13 Thread Artem Bityutskiy
ic notifiers instead of calling a function directly from the panic. -- Best Regards, Artem Bityutskiy (Артём Битюцкий) -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH, RFC] panic-note: Annotation from user space for panics

2009-11-13 Thread Artem Bityutskiy
You should use panic notifiers instead. See the panic_notifier_list. -- Best Regards, Artem Bityutskiy (Артём Битюцкий) -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: New fast(?)-boot results on ARM

2009-08-14 Thread Artem Bityutskiy
hings up a little as well. I saw some discussions about this on lkml. Having no compression at all may also be a good thing to try. -- Best Regards, Artem Bityutskiy (Артём Битюцкий) -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to

Re: New fast(?)-boot results on ARM

2009-08-14 Thread Artem Bityutskiy
lt to do UBI2. Here are few ideas: http://www.linux-mtd.infradead.org/faq/ubi.html#L_attach_faster -- Best Regards, Artem Bityutskiy (Артём Битюцкий) -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 00/14] Pramfs: Persistent and protected ram filesystem

2009-06-14 Thread Artem Bityutskiy
just introducing a "direct_io_only" mount option to a file-system which would need this feature. -- Best Regards, Artem Bityutskiy (Артём Битюцкий) -- To unsubscribe from this list: send the line "unsubscribe linux-embedded" in the body of a message to majord...@vger.kernel.o

Re: [PATCH 10/10] AXFS: axfs_uncompress.c

2008-08-21 Thread Artem Bityutskiy
ster than zlib on OMAP3. This depends on architecture, etc of course. This may matter a lot if one is fighting for faster system boot-up. So you might consider supporting LZO as well. -- Best regards, Artem Bityutskiy (Битюцкий Артём) -- To unsubscribe from this list: send the line "unsubscrib