Artur Skawina kirjoitti:
Kartsa wrote:
I was about to test the performance of vdr when I stumbled on this message
ERROR: /dev/dvb/adapter0/demux0: Too many open files
I do not recall seeing this earlier. This came when fourth simultaneous
recording started.
grep -20 -r EMFILE *
dvb/dvb-core/dmxdev.c-static int dvb_demux_open(struct inode *inode, struct
file *file)
dvb/dvb-core/dmxdev.c-{
dvb/dvb-core/dmxdev.c- struct dvb_device *dvbdev = file->private_data;
dvb/dvb-core/dmxdev.c- struct dmxdev *dmxdev = dvbdev->priv;
dvb/dvb-core/dmxdev.c- int i;
dvb/dvb-core/dmxdev.c- struct dmxdev_filter *dmxdevfilter;
dvb/dvb-core/dmxdev.c-
dvb/dvb-core/dmxdev.c- if (!dmxdev->filter)
dvb/dvb-core/dmxdev.c- return -EINVAL;
dvb/dvb-core/dmxdev.c-
dvb/dvb-core/dmxdev.c- if (mutex_lock_interruptible(&dmxdev->mutex))
dvb/dvb-core/dmxdev.c- return -ERESTARTSYS;
dvb/dvb-core/dmxdev.c-
dvb/dvb-core/dmxdev.c- for (i = 0; i < dmxdev->filternum; i++)
dvb/dvb-core/dmxdev.c- if (dmxdev->filter[i].state ==
DMXDEV_STATE_FREE)
dvb/dvb-core/dmxdev.c- break;
dvb/dvb-core/dmxdev.c-
dvb/dvb-core/dmxdev.c- if (i == dmxdev->filternum) {
dvb/dvb-core/dmxdev.c- mutex_unlock(&dmxdev->mutex);
dvb/dvb-core/dmxdev.c: return -EMFILE;
dvb/dvb-core/dmxdev.c- }
dvb/dvb-core/dmxdev.c-
dvb/dvb-core/dmxdev.c- dmxdevfilter = &dmxdev->filter[i];
dvb/dvb-core/dmxdev.c- mutex_init(&dmxdevfilter->mutex);
dvb/dvb-core/dmxdev.c- file->private_data = dmxdevfilter;
dvb/dvb-core/dmxdev.c-
dvb/dvb-core/dmxdev.c- dvb_ringbuffer_init(&dmxdevfilter->buffer, NULL, 8192);
dvb/dvb-core/dmxdev.c- dmxdevfilter->type = DMXDEV_TYPE_NONE;
dvb/dvb-core/dmxdev.c- dvb_dmxdev_filter_state_set(dmxdevfilter,
DMXDEV_STATE_ALLOCATED);
dvb/dvb-core/dmxdev.c- dmxdevfilter->feed.ts = NULL;
dvb/dvb-core/dmxdev.c- init_timer(&dmxdevfilter->timer);
dvb/dvb-core/dmxdev.c-
dvb/dvb-core/dmxdev.c- mutex_unlock(&dmxdev->mutex);
dvb/dvb-core/dmxdev.c- return 0;
dvb/dvb-core/dmxdev.c-}
IOW you ran out of filters.
yes, the error code should probably be different (eg EBUSY).
So, why did I ran out of filters? Why did it happen? Why doesn't it
happen on my other vdr box? And what does it cause? The recording did
succeed.
\\Kartsa
_______________________________________________
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr